Compare commits
No commits in common. "different_subspec" and "0.4.2" have entirely different histories.
different_
...
0.4.2
10
.github/ISSUE_TEMPLATE
vendored
10
.github/ISSUE_TEMPLATE
vendored
@ -1,10 +0,0 @@
|
||||
Thanks for your feedback!
|
||||
|
||||
If it's a bug:
|
||||
|
||||
- What's your environment:
|
||||
- run ` pod env | egrep 'CocoaPods |Xcode|cocoapods-binary' ` then paste the result here
|
||||
- A demo project is helpful:
|
||||
- It will be very helpful if provides a demo project that reproduce the problem. A blank project with cocoapods-binary can be downloaded [here](https://github.com/leavez/cocoapods-binary/files/3086250/BinaryDemo.zip), which can be remodeled to a minimal problematic environment. Attach the demo.zip to the comments.
|
||||
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,7 +3,6 @@ pkg
|
||||
.idea/
|
||||
|
||||
test/Pods
|
||||
test/Gemfile.lock
|
||||
|
||||
## Various settings
|
||||
*.pbxuser
|
||||
|
||||
3
Gemfile
3
Gemfile
@ -4,11 +4,10 @@ source 'https://rubygems.org'
|
||||
gemspec
|
||||
|
||||
group :development do
|
||||
gem 'cocoapods', '1.6.1'
|
||||
gem 'cocoapods'
|
||||
|
||||
gem 'mocha'
|
||||
gem 'bacon'
|
||||
gem 'mocha-on-bacon'
|
||||
gem 'prettybacon'
|
||||
|
||||
end
|
||||
|
||||
118
Gemfile.lock
118
Gemfile.lock
@ -1,118 +0,0 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
cocoapods-binary (0.4.4)
|
||||
cocoapods (>= 1.5.0, < 2.0)
|
||||
fourflusher (~> 2.0)
|
||||
xcpretty (~> 0.3.0)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
CFPropertyList (3.0.0)
|
||||
activesupport (4.2.11.1)
|
||||
i18n (~> 0.7)
|
||||
minitest (~> 5.1)
|
||||
thread_safe (~> 0.3, >= 0.3.4)
|
||||
tzinfo (~> 1.1)
|
||||
atomos (0.1.3)
|
||||
bacon (1.2.0)
|
||||
claide (1.0.2)
|
||||
cocoapods (1.6.1)
|
||||
activesupport (>= 4.0.2, < 5)
|
||||
claide (>= 1.0.2, < 2.0)
|
||||
cocoapods-core (= 1.6.1)
|
||||
cocoapods-deintegrate (>= 1.0.2, < 2.0)
|
||||
cocoapods-downloader (>= 1.2.2, < 2.0)
|
||||
cocoapods-plugins (>= 1.0.0, < 2.0)
|
||||
cocoapods-search (>= 1.0.0, < 2.0)
|
||||
cocoapods-stats (>= 1.0.0, < 2.0)
|
||||
cocoapods-trunk (>= 1.3.1, < 2.0)
|
||||
cocoapods-try (>= 1.1.0, < 2.0)
|
||||
colored2 (~> 3.1)
|
||||
escape (~> 0.0.4)
|
||||
fourflusher (>= 2.2.0, < 3.0)
|
||||
gh_inspector (~> 1.0)
|
||||
molinillo (~> 0.6.6)
|
||||
nap (~> 1.0)
|
||||
ruby-macho (~> 1.4)
|
||||
xcodeproj (>= 1.8.1, < 2.0)
|
||||
cocoapods-core (1.6.1)
|
||||
activesupport (>= 4.0.2, < 6)
|
||||
fuzzy_match (~> 2.0.4)
|
||||
nap (~> 1.0)
|
||||
cocoapods-deintegrate (1.0.4)
|
||||
cocoapods-downloader (1.2.2)
|
||||
cocoapods-plugins (1.0.0)
|
||||
nap
|
||||
cocoapods-search (1.0.0)
|
||||
cocoapods-stats (1.1.0)
|
||||
cocoapods-trunk (1.3.1)
|
||||
nap (>= 0.8, < 2.0)
|
||||
netrc (~> 0.11)
|
||||
cocoapods-try (1.1.0)
|
||||
colored2 (3.1.2)
|
||||
concurrent-ruby (1.1.5)
|
||||
diff-lcs (1.3)
|
||||
escape (0.0.4)
|
||||
fourflusher (2.2.0)
|
||||
fuzzy_match (2.0.4)
|
||||
gh_inspector (1.1.3)
|
||||
i18n (0.9.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
metaclass (0.0.4)
|
||||
minitest (5.11.3)
|
||||
mocha (1.8.0)
|
||||
metaclass (~> 0.0.1)
|
||||
mocha-on-bacon (0.2.3)
|
||||
mocha (>= 0.13.0)
|
||||
molinillo (0.6.6)
|
||||
nanaimo (0.2.6)
|
||||
nap (1.1.0)
|
||||
netrc (0.11.0)
|
||||
prettybacon (0.0.2)
|
||||
bacon (~> 1.2)
|
||||
rake (12.3.2)
|
||||
rouge (2.0.7)
|
||||
rspec (3.8.0)
|
||||
rspec-core (~> 3.8.0)
|
||||
rspec-expectations (~> 3.8.0)
|
||||
rspec-mocks (~> 3.8.0)
|
||||
rspec-core (3.8.0)
|
||||
rspec-support (~> 3.8.0)
|
||||
rspec-expectations (3.8.3)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.8.0)
|
||||
rspec-mocks (3.8.0)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.8.0)
|
||||
rspec-support (3.8.0)
|
||||
ruby-macho (1.4.0)
|
||||
thread_safe (0.3.6)
|
||||
tzinfo (1.2.5)
|
||||
thread_safe (~> 0.1)
|
||||
xcodeproj (1.8.2)
|
||||
CFPropertyList (>= 2.3.3, < 4.0)
|
||||
atomos (~> 0.1.3)
|
||||
claide (>= 1.0.2, < 2.0)
|
||||
colored2 (~> 3.1)
|
||||
nanaimo (~> 0.2.6)
|
||||
xcpretty (0.3.0)
|
||||
rouge (~> 2.0.7)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
bacon
|
||||
bundler (~> 2.0)
|
||||
cocoapods (= 1.6.1)
|
||||
cocoapods-binary!
|
||||
mocha
|
||||
mocha-on-bacon
|
||||
prettybacon
|
||||
rake
|
||||
rspec
|
||||
|
||||
BUNDLED WITH
|
||||
2.0.1
|
||||
@ -1,13 +1,9 @@
|
||||
|
||||
<p align="center"><img src="/test/logo.png" width="622"></p>
|
||||
# cocoapods-binary
|
||||
|
||||
[](https://travis-ci.org/leavez/cocoapods-binary)
|
||||
|
||||
A CocoaPods plugin to integrate pods in form of prebuilt frameworks, not source code, by adding **just one flag** in podfile. Speed up compiling dramatically.
|
||||
|
||||
Good news: Introduction on cocoapods offical site: [Pre-compiling dependencies](http://guides.cocoapods.org/plugins/pre-compiling-dependencies.html) ( NOTE: This plugin is a community work, not official.)
|
||||
|
||||
|
||||
## Why
|
||||
|
||||
You may wonder why CocoaPods doesn't have a function to integrate libs in form of binaries, if there are dozens or hundreds of pods in your podfile and compile them for a great many times meaninglessly. Too many source code of libs slow down your compile and the response of IDE (e.g. code completion), and then reduce work efficiency, leaving us time to think about the meaning of life.
|
||||
@ -67,7 +63,7 @@ If bitcode is needed, add a `enable_bitcode_for_prebuilt_frameworks!` before all
|
||||
#### Known Issues
|
||||
|
||||
- doesn't support watchos now
|
||||
- ~~dSYM files is missing for dynamic frameworks using this plugin. Walkaround: Don't use this plugin for a release build. Add a if condition with ENV around `plugin 'cocoapods-binary'`. [(detail)](https://github.com/leavez/cocoapods-binary/issues/44)~~ (fix in 0.4.2)
|
||||
- dSYM files is missing for dynamic frameworks using this plugin. Walkaround: Don't use this plugin for a release build. Add a if condition with ENV around `plugin 'cocoapods-binary'`
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@ -13,17 +13,14 @@ Gem::Specification.new do |spec|
|
||||
spec.homepage = 'https://github.com/leavez/cocoapods-binary'
|
||||
spec.license = 'MIT'
|
||||
|
||||
spec.files = `git ls-files`.split($/).reject{|f| f.start_with?("test/") || f.start_with?('demo/')}
|
||||
spec.files = `git ls-files`.split($/).reject{|f| f.start_with? "test/"}
|
||||
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
||||
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
||||
spec.require_paths = ['lib']
|
||||
|
||||
spec.add_dependency "cocoapods", ">= 1.5.0", "< 2.0"
|
||||
spec.add_dependency "fourflusher", "~> 2.0"
|
||||
spec.add_dependency "xcpretty", "~> 0.3.0"
|
||||
|
||||
spec.add_development_dependency 'bundler', '~> 2.0'
|
||||
spec.add_development_dependency 'bundler', '~> 1.3'
|
||||
spec.add_development_dependency 'rake'
|
||||
spec.add_development_dependency 'rspec'
|
||||
|
||||
end
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
---
|
||||
BUNDLE_PATH: "./.bundler_cache"
|
||||
50
demo/.gitignore
vendored
50
demo/.gitignore
vendored
@ -1,50 +0,0 @@
|
||||
|
||||
# Created by https://www.gitignore.io/api/xcode,cocoapods
|
||||
# Edit at https://www.gitignore.io/?templates=xcode,cocoapods
|
||||
|
||||
### CocoaPods ###
|
||||
## CocoaPods GitIgnore Template
|
||||
|
||||
# CocoaPods - Only use to conserve bandwidth / Save time on Pushing
|
||||
# - Also handy if you have a large number of dependant pods
|
||||
# - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGNORE THE LOCK FILE
|
||||
Pods/
|
||||
|
||||
### Xcode ###
|
||||
# Xcode
|
||||
#
|
||||
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
|
||||
|
||||
## User settings
|
||||
xcuserdata/
|
||||
|
||||
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
|
||||
*.xcscmblueprint
|
||||
*.xccheckout
|
||||
|
||||
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
|
||||
build/
|
||||
DerivedData/
|
||||
*.moved-aside
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
*.mode1v3
|
||||
!default.mode1v3
|
||||
*.mode2v3
|
||||
!default.mode2v3
|
||||
*.perspectivev3
|
||||
!default.perspectivev3
|
||||
|
||||
### Xcode Patch ###
|
||||
*.xcodeproj/*
|
||||
!*.xcodeproj/project.pbxproj
|
||||
!*.xcodeproj/xcshareddata/
|
||||
!*.xcworkspace/contents.xcworkspacedata
|
||||
/*.gcno
|
||||
**/xcshareddata/WorkspaceSettings.xcsettings
|
||||
|
||||
# End of https://www.gitignore.io/api/xcode,cocoapods
|
||||
|
||||
|
||||
# the bundler local cache
|
||||
.bundler_cache/
|
||||
@ -1,7 +0,0 @@
|
||||
|
||||
# frozen_string_literal: true
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem 'cocoapods', '1.6.1'
|
||||
gem 'cocoapods-binary', :path => "../"
|
||||
gem 'xcpretty'
|
||||
@ -1,89 +0,0 @@
|
||||
PATH
|
||||
remote: ..
|
||||
specs:
|
||||
cocoapods-binary (0.4.4)
|
||||
cocoapods (>= 1.5.0, < 2.0)
|
||||
fourflusher (~> 2.0)
|
||||
xcpretty (~> 0.3.0)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
CFPropertyList (3.0.0)
|
||||
activesupport (4.2.11.1)
|
||||
i18n (~> 0.7)
|
||||
minitest (~> 5.1)
|
||||
thread_safe (~> 0.3, >= 0.3.4)
|
||||
tzinfo (~> 1.1)
|
||||
atomos (0.1.3)
|
||||
claide (1.0.2)
|
||||
cocoapods (1.6.1)
|
||||
activesupport (>= 4.0.2, < 5)
|
||||
claide (>= 1.0.2, < 2.0)
|
||||
cocoapods-core (= 1.6.1)
|
||||
cocoapods-deintegrate (>= 1.0.2, < 2.0)
|
||||
cocoapods-downloader (>= 1.2.2, < 2.0)
|
||||
cocoapods-plugins (>= 1.0.0, < 2.0)
|
||||
cocoapods-search (>= 1.0.0, < 2.0)
|
||||
cocoapods-stats (>= 1.0.0, < 2.0)
|
||||
cocoapods-trunk (>= 1.3.1, < 2.0)
|
||||
cocoapods-try (>= 1.1.0, < 2.0)
|
||||
colored2 (~> 3.1)
|
||||
escape (~> 0.0.4)
|
||||
fourflusher (>= 2.2.0, < 3.0)
|
||||
gh_inspector (~> 1.0)
|
||||
molinillo (~> 0.6.6)
|
||||
nap (~> 1.0)
|
||||
ruby-macho (~> 1.4)
|
||||
xcodeproj (>= 1.8.1, < 2.0)
|
||||
cocoapods-core (1.6.1)
|
||||
activesupport (>= 4.0.2, < 6)
|
||||
fuzzy_match (~> 2.0.4)
|
||||
nap (~> 1.0)
|
||||
cocoapods-deintegrate (1.0.4)
|
||||
cocoapods-downloader (1.2.2)
|
||||
cocoapods-plugins (1.0.0)
|
||||
nap
|
||||
cocoapods-search (1.0.0)
|
||||
cocoapods-stats (1.1.0)
|
||||
cocoapods-trunk (1.3.1)
|
||||
nap (>= 0.8, < 2.0)
|
||||
netrc (~> 0.11)
|
||||
cocoapods-try (1.1.0)
|
||||
colored2 (3.1.2)
|
||||
concurrent-ruby (1.1.5)
|
||||
escape (0.0.4)
|
||||
fourflusher (2.2.0)
|
||||
fuzzy_match (2.0.4)
|
||||
gh_inspector (1.1.3)
|
||||
i18n (0.9.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
minitest (5.11.3)
|
||||
molinillo (0.6.6)
|
||||
nanaimo (0.2.6)
|
||||
nap (1.1.0)
|
||||
netrc (0.11.0)
|
||||
rouge (2.0.7)
|
||||
ruby-macho (1.4.0)
|
||||
thread_safe (0.3.6)
|
||||
tzinfo (1.2.5)
|
||||
thread_safe (~> 0.1)
|
||||
xcodeproj (1.8.2)
|
||||
CFPropertyList (>= 2.3.3, < 4.0)
|
||||
atomos (~> 0.1.3)
|
||||
claide (>= 1.0.2, < 2.0)
|
||||
colored2 (~> 3.1)
|
||||
nanaimo (~> 0.2.6)
|
||||
xcpretty (0.3.0)
|
||||
rouge (~> 2.0.7)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
cocoapods (= 1.6.1)
|
||||
cocoapods-binary!
|
||||
xcpretty
|
||||
|
||||
BUNDLED WITH
|
||||
2.0.1
|
||||
47
demo/Podfile
47
demo/Podfile
@ -1,47 +0,0 @@
|
||||
source 'https://github.com/CocoaPods/Specs.git'
|
||||
|
||||
plugin 'cocoapods-binary'
|
||||
platform :ios, '11.2'
|
||||
use_frameworks!
|
||||
inhibit_all_warnings!
|
||||
keep_source_code_for_prebuilt_frameworks!
|
||||
#all_binary!
|
||||
|
||||
target 'demo' do
|
||||
# RxSwift
|
||||
|
||||
pod "AFNetworking/Security"
|
||||
pod "MBKCoreAudioPlayer", :git => '/Users/lea/byte/test/MBKCoreAudioPlayer'
|
||||
|
||||
# # Firebase
|
||||
# pod 'Firebase/Core', :binary => true
|
||||
# pod 'Firebase/Firestore'
|
||||
# pod 'Firebase/Auth'
|
||||
# pod 'CodableFirebase'
|
||||
end
|
||||
|
||||
target 'demoTests' do
|
||||
|
||||
# pod 'Firebase/Core'
|
||||
# pod 'Firebase/Firestore'
|
||||
# pod 'CodableFirebase'
|
||||
end
|
||||
|
||||
# target 'AnimalHouseHttpContractTests' do
|
||||
# pod 'RxSwift'
|
||||
# pod 'RxCocoa'
|
||||
|
||||
# pod 'RxBlocking'
|
||||
# end
|
||||
|
||||
# target 'RoadTripTests' do
|
||||
# pod 'RxSwift'
|
||||
# pod 'RxCocoa'
|
||||
# pod 'RxDataSources'
|
||||
|
||||
# pod 'Firebase/Core'
|
||||
# pod 'Firebase/Auth'
|
||||
|
||||
# pod 'RxTest'
|
||||
# pod 'RxBlocking'
|
||||
# end
|
||||
@ -1,30 +0,0 @@
|
||||
PODS:
|
||||
- AFNetworking/Reachability (3.2.1)
|
||||
- AFNetworking/Security (3.2.1)
|
||||
- MBKCoreAudioPlayer (0.1.0):
|
||||
- AFNetworking/Reachability
|
||||
|
||||
DEPENDENCIES:
|
||||
- AFNetworking/Security
|
||||
- MBKCoreAudioPlayer (from `/Users/lea/byte/test/MBKCoreAudioPlayer`)
|
||||
|
||||
SPEC REPOS:
|
||||
https://github.com/cocoapods/specs.git:
|
||||
- AFNetworking
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
MBKCoreAudioPlayer:
|
||||
:git: "/Users/lea/byte/test/MBKCoreAudioPlayer"
|
||||
|
||||
CHECKOUT OPTIONS:
|
||||
MBKCoreAudioPlayer:
|
||||
:commit: 4da6aba01ea48f8ef6c4d45da1eb97ad9ae82205
|
||||
:git: "/Users/lea/byte/test/MBKCoreAudioPlayer"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
AFNetworking: b6f891fdfaed196b46c7a83cf209e09697b94057
|
||||
MBKCoreAudioPlayer: 996c4ecc9d146598001e0cf9d98fabb6a338888a
|
||||
|
||||
PODFILE CHECKSUM: 2cca0929b163692b302f27e4242a12f0c54cd3b6
|
||||
|
||||
COCOAPODS: 1.6.1
|
||||
@ -1,569 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
2D9A260E8A0E3144419CB9CC /* Pods_demoTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F95BAE6229AA9F41F56F06E1 /* Pods_demoTests.framework */; };
|
||||
2E1AEA2ADE0B2C6D0E8CB73C /* BDWebImage_demo.m in Sources */ = {isa = PBXBuildFile; fileRef = 89A7B09D8E1B9A5928206B3D /* BDWebImage_demo.m */; };
|
||||
3EAFB6B6226E35CC00840968 /* demoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EAFB6B5226E35CC00840968 /* demoTests.swift */; };
|
||||
7ADC04F6B6AD86B4711FC662 /* Pods_demo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0282097ED33E34DF2FB40193 /* Pods_demo.framework */; };
|
||||
8BC2E4C8225F2B8600EC0609 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BC2E4C7225F2B8600EC0609 /* AppDelegate.swift */; };
|
||||
8BC2E4CA225F2B8600EC0609 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BC2E4C9225F2B8600EC0609 /* ViewController.swift */; };
|
||||
8BC2E4D2225F2B8700EC0609 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8BC2E4D0225F2B8700EC0609 /* LaunchScreen.storyboard */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
3EAFB6B8226E35CC00840968 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 8BC2E4BC225F2B8600EC0609 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 8BC2E4C3225F2B8600EC0609;
|
||||
remoteInfo = demo;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
0282097ED33E34DF2FB40193 /* Pods_demo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_demo.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3EAFB6B3226E35CC00840968 /* demoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = demoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3EAFB6B5226E35CC00840968 /* demoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = demoTests.swift; sourceTree = "<group>"; };
|
||||
3EAFB6B7226E35CC00840968 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
89A7B09D8E1B9A5928206B3D /* BDWebImage_demo.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = BDWebImage_demo.m; sourceTree = "<group>"; };
|
||||
8BC2E4C4225F2B8600EC0609 /* demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
8BC2E4C7225F2B8600EC0609 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
8BC2E4C9225F2B8600EC0609 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
||||
8BC2E4D1225F2B8700EC0609 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
8BC2E4D3225F2B8700EC0609 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
9A8064F1F3E5738D234C80E2 /* Pods-demoTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-demoTests.release.xcconfig"; path = "Target Support Files/Pods-demoTests/Pods-demoTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
C55F7BF03CC970F91505F490 /* Pods-demoTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-demoTests.debug.xcconfig"; path = "Target Support Files/Pods-demoTests/Pods-demoTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
E9C2707150376AA5D63E8BAE /* Pods-demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-demo.release.xcconfig"; path = "Target Support Files/Pods-demo/Pods-demo.release.xcconfig"; sourceTree = "<group>"; };
|
||||
F8A8B289BFEAE54B0D540472 /* Pods-demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-demo.debug.xcconfig"; path = "Target Support Files/Pods-demo/Pods-demo.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
F95BAE6229AA9F41F56F06E1 /* Pods_demoTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_demoTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
3EAFB6B0226E35CC00840968 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2D9A260E8A0E3144419CB9CC /* Pods_demoTests.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
8BC2E4C1225F2B8600EC0609 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7ADC04F6B6AD86B4711FC662 /* Pods_demo.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
03BCE6F733E8AF8755385CE8 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0282097ED33E34DF2FB40193 /* Pods_demo.framework */,
|
||||
F95BAE6229AA9F41F56F06E1 /* Pods_demoTests.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3EAFB6B4226E35CC00840968 /* demoTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3EAFB6B5226E35CC00840968 /* demoTests.swift */,
|
||||
3EAFB6B7226E35CC00840968 /* Info.plist */,
|
||||
);
|
||||
path = demoTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
48064E0CABFB2B206E032E3B /* demos */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
89A7B09D8E1B9A5928206B3D /* BDWebImage_demo.m */,
|
||||
);
|
||||
name = demos;
|
||||
path = ./demos;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8BC2E4BB225F2B8600EC0609 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BC2E4C6225F2B8600EC0609 /* demo */,
|
||||
3EAFB6B4226E35CC00840968 /* demoTests */,
|
||||
8BC2E4C5225F2B8600EC0609 /* Products */,
|
||||
D25B1A678978B02ABFF01D1C /* Pods */,
|
||||
03BCE6F733E8AF8755385CE8 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8BC2E4C5225F2B8600EC0609 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BC2E4C4225F2B8600EC0609 /* demo.app */,
|
||||
3EAFB6B3226E35CC00840968 /* demoTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8BC2E4C6225F2B8600EC0609 /* demo */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BC2E4C7225F2B8600EC0609 /* AppDelegate.swift */,
|
||||
8BC2E4C9225F2B8600EC0609 /* ViewController.swift */,
|
||||
8BC2E4D0225F2B8700EC0609 /* LaunchScreen.storyboard */,
|
||||
8BC2E4D3225F2B8700EC0609 /* Info.plist */,
|
||||
48064E0CABFB2B206E032E3B /* demos */,
|
||||
);
|
||||
path = demo;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D25B1A678978B02ABFF01D1C /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F8A8B289BFEAE54B0D540472 /* Pods-demo.debug.xcconfig */,
|
||||
E9C2707150376AA5D63E8BAE /* Pods-demo.release.xcconfig */,
|
||||
C55F7BF03CC970F91505F490 /* Pods-demoTests.debug.xcconfig */,
|
||||
9A8064F1F3E5738D234C80E2 /* Pods-demoTests.release.xcconfig */,
|
||||
);
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
3EAFB6B2226E35CC00840968 /* demoTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3EAFB6BC226E35CC00840968 /* Build configuration list for PBXNativeTarget "demoTests" */;
|
||||
buildPhases = (
|
||||
67074144CE0F3108E2575310 /* [CP] Check Pods Manifest.lock */,
|
||||
3EAFB6AF226E35CC00840968 /* Sources */,
|
||||
3EAFB6B0226E35CC00840968 /* Frameworks */,
|
||||
3EAFB6B1226E35CC00840968 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
3EAFB6B9226E35CC00840968 /* PBXTargetDependency */,
|
||||
);
|
||||
name = demoTests;
|
||||
productName = demoTests;
|
||||
productReference = 3EAFB6B3226E35CC00840968 /* demoTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
8BC2E4C3225F2B8600EC0609 /* demo */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 8BC2E4E1225F2B8800EC0609 /* Build configuration list for PBXNativeTarget "demo" */;
|
||||
buildPhases = (
|
||||
4A7278B702427200DBDC45CB /* [CP] Check Pods Manifest.lock */,
|
||||
8BC2E4C0225F2B8600EC0609 /* Sources */,
|
||||
8BC2E4C1225F2B8600EC0609 /* Frameworks */,
|
||||
8BC2E4C2225F2B8600EC0609 /* Resources */,
|
||||
27E132FE722A29856F619A3D /* [CP] Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = demo;
|
||||
productName = demo;
|
||||
productReference = 8BC2E4C4225F2B8600EC0609 /* demo.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
8BC2E4BC225F2B8600EC0609 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 1020;
|
||||
LastUpgradeCheck = 1020;
|
||||
TargetAttributes = {
|
||||
3EAFB6B2226E35CC00840968 = {
|
||||
CreatedOnToolsVersion = 10.2.1;
|
||||
TestTargetID = 8BC2E4C3225F2B8600EC0609;
|
||||
};
|
||||
8BC2E4C3225F2B8600EC0609 = {
|
||||
CreatedOnToolsVersion = 10.2;
|
||||
};
|
||||
};
|
||||
binary = binary;
|
||||
};
|
||||
buildConfigurationList = 8BC2E4BF225F2B8600EC0609 /* Build configuration list for PBXProject "demo" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 8BC2E4BB225F2B8600EC0609;
|
||||
productRefGroup = 8BC2E4C5225F2B8600EC0609 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8BC2E4C3225F2B8600EC0609 /* demo */,
|
||||
3EAFB6B2226E35CC00840968 /* demoTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
3EAFB6B1226E35CC00840968 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
8BC2E4C2225F2B8600EC0609 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8BC2E4D2225F2B8700EC0609 /* LaunchScreen.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
27E132FE722A29856F619A3D /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-demo/Pods-demo-frameworks.sh",
|
||||
"${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/MBKCoreAudioPlayer/MBKCoreAudioPlayer.framework",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBKCoreAudioPlayer.framework",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-demo/Pods-demo-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
4A7278B702427200DBDC45CB /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-demo-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
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;
|
||||
};
|
||||
67074144CE0F3108E2575310 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-demoTests-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
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;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
3EAFB6AF226E35CC00840968 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3EAFB6B6226E35CC00840968 /* demoTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
8BC2E4C0225F2B8600EC0609 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8BC2E4CA225F2B8600EC0609 /* ViewController.swift in Sources */,
|
||||
8BC2E4C8225F2B8600EC0609 /* AppDelegate.swift in Sources */,
|
||||
2E1AEA2ADE0B2C6D0E8CB73C /* BDWebImage_demo.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
3EAFB6B9226E35CC00840968 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 8BC2E4C3225F2B8600EC0609 /* demo */;
|
||||
targetProxy = 3EAFB6B8226E35CC00840968 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
8BC2E4D0225F2B8700EC0609 /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
8BC2E4D1225F2B8700EC0609 /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
3EAFB6BA226E35CC00840968 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = C55F7BF03CC970F91505F490 /* Pods-demoTests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
INFOPLIST_FILE = demoTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods-binary.demoTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/demo.app/demo";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3EAFB6BB226E35CC00840968 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9A8064F1F3E5738D234C80E2 /* Pods-demoTests.release.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
INFOPLIST_FILE = demoTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods-binary.demoTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/demo.app/demo";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
8BC2E4DF225F2B8800EC0609 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
8BC2E4E0225F2B8800EC0609 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
8BC2E4E2225F2B8800EC0609 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = F8A8B289BFEAE54B0D540472 /* Pods-demo.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
INFOPLIST_FILE = demo/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = me.leavez.demo;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
8BC2E4E3225F2B8800EC0609 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = E9C2707150376AA5D63E8BAE /* Pods-demo.release.xcconfig */;
|
||||
buildSettings = {
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
INFOPLIST_FILE = demo/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = me.leavez.demo;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
3EAFB6BC226E35CC00840968 /* Build configuration list for PBXNativeTarget "demoTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3EAFB6BA226E35CC00840968 /* Debug */,
|
||||
3EAFB6BB226E35CC00840968 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
8BC2E4BF225F2B8600EC0609 /* Build configuration list for PBXProject "demo" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
8BC2E4DF225F2B8800EC0609 /* Debug */,
|
||||
8BC2E4E0225F2B8800EC0609 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
8BC2E4E1225F2B8800EC0609 /* Build configuration list for PBXNativeTarget "demo" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
8BC2E4E2225F2B8800EC0609 /* Debug */,
|
||||
8BC2E4E3225F2B8800EC0609 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 8BC2E4BC225F2B8600EC0609 /* Project object */;
|
||||
}
|
||||
10
demo/demo.xcworkspace/contents.xcworkspacedata
generated
10
demo/demo.xcworkspace/contents.xcworkspacedata
generated
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:demo.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@ -1,8 +0,0 @@
|
||||
<?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>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -1,53 +0,0 @@
|
||||
//
|
||||
// AppDelegate.swift
|
||||
// demo
|
||||
//
|
||||
// Created by Leavez on 2019/04/16.
|
||||
// Copyright © 2019 binary. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
@UIApplicationMain
|
||||
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 viewController = ViewController(nibName: nil, bundle: nil)
|
||||
let window = UIWindow(frame: UIScreen.main.bounds)
|
||||
window.rootViewController = viewController
|
||||
self.window = window
|
||||
window.makeKeyAndVisible()
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func applicationWillResignActive(_ application: UIApplication) {
|
||||
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
|
||||
}
|
||||
|
||||
func applicationDidEnterBackground(_ application: UIApplication) {
|
||||
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
|
||||
}
|
||||
|
||||
func applicationWillEnterForeground(_ application: UIApplication) {
|
||||
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
|
||||
}
|
||||
|
||||
func applicationDidBecomeActive(_ application: UIApplication) {
|
||||
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||
}
|
||||
|
||||
func applicationWillTerminate(_ application: UIApplication) {
|
||||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
<?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" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<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>
|
||||
@ -1,43 +0,0 @@
|
||||
<?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>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -1,21 +0,0 @@
|
||||
//
|
||||
// ViewController.swift
|
||||
// demo
|
||||
//
|
||||
// Created by Leavez on 2019/04/16.
|
||||
// Copyright © 2019 binary. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class ViewController: UIViewController {
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Do any additional setup after loading the view.
|
||||
view.backgroundColor = .white
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
|
||||
// this is a demo for usage
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Masonry/Masonry.h>
|
||||
void masonry_demo() {
|
||||
|
||||
UIView *parent_view = [UIView new];
|
||||
UIView *view1 = [UIView new];
|
||||
[parent_view addSubview:view1];
|
||||
|
||||
[view1 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(0);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
<?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>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -1,32 +0,0 @@
|
||||
//
|
||||
// demoTests.swift
|
||||
// demoTests
|
||||
//
|
||||
// Created by Gao on 2019/4/23.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
class demoTests: XCTestCase {
|
||||
|
||||
override func setUp() {
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
func testExample() {
|
||||
// This is an example of a functional test case.
|
||||
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
||||
}
|
||||
|
||||
func testPerformanceExample() {
|
||||
// This is an example of a performance test case.
|
||||
self.measure {
|
||||
// Put the code you want to measure the time of here.
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,10 +1,7 @@
|
||||
require_relative 'extensions/podfile_options'
|
||||
require_relative 'helper/podfile_options'
|
||||
require_relative 'helper/feature_switches'
|
||||
require_relative 'extensions/prebuild_sandbox'
|
||||
require_relative 'extensions/installer_prebuild_targets'
|
||||
require_relative 'helper/prebuild_sandbox'
|
||||
require_relative 'helper/passer'
|
||||
require_relative 'helper/names'
|
||||
require_relative 'helper/target_checker'
|
||||
|
||||
|
||||
# NOTE:
|
||||
@ -27,11 +24,14 @@ module Pod
|
||||
|
||||
# make a symlink to target folder
|
||||
prebuild_sandbox = Pod::PrebuildSandbox.from_standard_sandbox(standard_sanbox)
|
||||
# if spec used in multiple platforms, it may return multiple paths
|
||||
target_names = prebuild_sandbox.existed_target_names_for_pod_name(self.name)
|
||||
|
||||
real_file_folder = prebuild_sandbox.framework_folder_path_for_pod_name(self.name)
|
||||
|
||||
target_folder = standard_sanbox.pod_dir(self.name)
|
||||
target_folder.rmtree if target_folder.exist?
|
||||
target_folder.mkdir
|
||||
|
||||
# make a relatvie symbol link for all children
|
||||
def walk(path, &action)
|
||||
return unless path.exist?
|
||||
path.children.each do |child|
|
||||
result = action.call(child, &action)
|
||||
if child.directory?
|
||||
@ -50,51 +50,31 @@ module Pod
|
||||
target = target_folder + source.relative_path_from(basefolder)
|
||||
make_link(source, target)
|
||||
end
|
||||
|
||||
target_names.each do |name|
|
||||
|
||||
# symbol link copy all substructure
|
||||
real_file_folder = prebuild_sandbox.framework_folder_path_for_target_name(name)
|
||||
|
||||
# If have only one platform, just place int the root folder of this pod.
|
||||
# If have multiple paths, we use a sperated folder to store different
|
||||
# platform frameworks. e.g. AFNetworking/AFNetworking-iOS/AFNetworking.framework
|
||||
|
||||
target_folder = standard_sanbox.pod_dir(self.name)
|
||||
if target_names.count > 1
|
||||
target_folder += real_file_folder.basename
|
||||
# symbol link copy all substructure
|
||||
walk(real_file_folder) do |child|
|
||||
source = child
|
||||
# only make symlink to file and `.framework` folder
|
||||
if child.directory? and [".framework", ".dSYM"].include? child.extname
|
||||
mirror_with_symlink(source, real_file_folder, target_folder)
|
||||
next false # return false means don't go deeper
|
||||
elsif child.file?
|
||||
mirror_with_symlink(source, real_file_folder, target_folder)
|
||||
next true
|
||||
else
|
||||
next true
|
||||
end
|
||||
target_folder.rmtree if target_folder.exist?
|
||||
target_folder.mkpath
|
||||
end
|
||||
|
||||
|
||||
walk(real_file_folder) do |child|
|
||||
source = child
|
||||
# only make symlink to file and `.framework` folder
|
||||
if child.directory? and [".framework", ".dSYM"].include? child.extname
|
||||
mirror_with_symlink(source, real_file_folder, target_folder)
|
||||
next false # return false means don't go deeper
|
||||
elsif child.file?
|
||||
mirror_with_symlink(source, real_file_folder, target_folder)
|
||||
next true
|
||||
else
|
||||
next true
|
||||
end
|
||||
# symbol link copy resource for static framework
|
||||
hash = Prebuild::Passer.resources_to_copy_for_static_framework || {}
|
||||
path_objects = hash[self.name]
|
||||
if path_objects != nil
|
||||
path_objects.each do |object|
|
||||
make_link(object.real_file_path, object.target_file_path)
|
||||
end
|
||||
|
||||
|
||||
# symbol link copy resource for static framework
|
||||
hash = Prebuild::Passer.resources_to_copy_for_static_framework || {}
|
||||
|
||||
path_objects = hash[name]
|
||||
if path_objects != nil
|
||||
path_objects.each do |object|
|
||||
make_link(object.real_file_path, object.target_file_path)
|
||||
end
|
||||
end
|
||||
end # of for each
|
||||
|
||||
end # of method
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
@ -115,7 +95,7 @@ module Pod
|
||||
changes = Pod::Prebuild::Passer.prebuild_pods_changes
|
||||
updated_names = []
|
||||
if changes == nil
|
||||
updated_names = PrebuildSandbox.from_standard_sandbox(self.sandbox).exsited_framework_pod_names
|
||||
updated_names = PrebuildSandbox.from_standard_sandbox(self.sandbox).exsited_framework_names
|
||||
else
|
||||
added = changes.added
|
||||
changed = changes.changed
|
||||
@ -147,37 +127,16 @@ module Pod
|
||||
|
||||
# call original
|
||||
old_method2.bind(self).()
|
||||
# ...
|
||||
# ...
|
||||
# ...
|
||||
# after finishing the very complex orginal function
|
||||
|
||||
# check the pods
|
||||
# Although we have did it in prebuild stage, it's not sufficient.
|
||||
# Same pod may appear in another target in form of source code.
|
||||
# Prebuild.check_one_pod_should_have_only_one_target(self.prebuild_pod_targets)
|
||||
self.validate_every_pod_only_have_one_form
|
||||
|
||||
|
||||
# prepare
|
||||
cache = []
|
||||
# check the prebuilt targets
|
||||
targets = self.prebuild_pod_targets
|
||||
targets_have_different_platforms = targets.select {|t| t.pod_name != t.name }
|
||||
|
||||
def add_vendered_framework(spec, platform, added_framework_file_path)
|
||||
if spec.attributes_hash[platform] == nil
|
||||
spec.attributes_hash[platform] = {}
|
||||
end
|
||||
vendored_frameworks = spec.attributes_hash[platform]["vendored_frameworks"] || []
|
||||
vendored_frameworks = [vendored_frameworks] if vendored_frameworks.kind_of?(String)
|
||||
vendored_frameworks += [added_framework_file_path]
|
||||
spec.attributes_hash[platform]["vendored_frameworks"] = vendored_frameworks
|
||||
end
|
||||
def empty_source_files(spec)
|
||||
spec.attributes_hash["source_files"] = []
|
||||
["ios", "watchos", "tvos", "osx"].each do |plat|
|
||||
if spec.attributes_hash[plat] != nil
|
||||
spec.attributes_hash[plat]["source_files"] = []
|
||||
end
|
||||
end
|
||||
if targets_have_different_platforms.count > 0
|
||||
names = targets_have_different_platforms.map(&:pod_name)
|
||||
STDERR.puts "[!] Binary doesn't support pods who integrate in 2 or more platforms simultaneously: #{names}".red
|
||||
exit
|
||||
end
|
||||
|
||||
|
||||
@ -185,36 +144,41 @@ module Pod
|
||||
prebuilt_specs = (specs.select do |spec|
|
||||
self.prebuild_pod_names.include? spec.root.name
|
||||
end)
|
||||
|
||||
# make sturcture to fast get target by name
|
||||
name_to_target_hash = self.pod_targets.reduce({}) do |sum, target|
|
||||
sum[target.name] = target
|
||||
sum
|
||||
end
|
||||
|
||||
prebuilt_specs.each do |spec|
|
||||
# `spec` may be a subspec, so we use the root's name
|
||||
p spec.name
|
||||
p spec.target_definition
|
||||
p spec.target_definition.
|
||||
# `spec` may be a subspec, so we use the root's name
|
||||
root_name = spec.root.name
|
||||
#TODO target_name pod_name!!!!
|
||||
|
||||
target = name_to_target_hash[root_name]
|
||||
next if Prebuild::Passer.target_names_to_skip_integration_framework.include? target.name
|
||||
next if Prebuild::Passer.target_names_to_skip_integration_framework.include? target.pod_name
|
||||
|
||||
|
||||
p ",,", target.target_definition
|
||||
|
||||
|
||||
# Use the prebuild framworks as vendered frameworks
|
||||
# get_corresponding_targets
|
||||
targets = Pod.fast_get_targets_for_pod_name(spec.root.name, self.pod_targets, cache)
|
||||
targets.each do |target|
|
||||
# the framework_file_path rule is decided when `install_for_prebuild`,
|
||||
# as to compitable with older version and be less wordy.
|
||||
framework_file_path = target.framework_name
|
||||
framework_file_path = target.name + "/" + framework_file_path if targets.count > 1
|
||||
add_vendered_framework(spec, target.platform.name.to_s, framework_file_path)
|
||||
# use the prebuilt framework
|
||||
original_vendored_frameworks = spec.attributes_hash["vendored_frameworks"] || []
|
||||
if original_vendored_frameworks.kind_of?(String)
|
||||
original_vendored_frameworks = [original_vendored_frameworks]
|
||||
end
|
||||
original_vendored_frameworks += [target.framework_name]
|
||||
spec.attributes_hash["vendored_frameworks"] = original_vendored_frameworks
|
||||
spec.attributes_hash["source_files"] = []
|
||||
|
||||
# to remove the resurce bundle target.
|
||||
# When specify the "resource_bundles" in podspec, xcode will generate a bundle
|
||||
# target after pod install. But the bundle have already built when the prebuit
|
||||
# phase and saved in the framework folder. We will treat it as a normal resource
|
||||
# file.
|
||||
# https://github.com/leavez/cocoapods-binary/issues/29
|
||||
if spec.attributes_hash["resource_bundles"]
|
||||
bundle_names = spec.attributes_hash["resource_bundles"].keys
|
||||
spec.attributes_hash["resource_bundles"] = nil
|
||||
spec.attributes_hash["resources"] ||= []
|
||||
spec.attributes_hash["resources"] += bundle_names.map{|n| n+".bundle"}
|
||||
end
|
||||
# Clean the source files
|
||||
# we just add the prebuilt framework to specific platform and set no source files
|
||||
# for all platform, so it doesn't support the sence that 'a pod perbuild for one
|
||||
# platform and not for another platform.'
|
||||
empty_source_files(spec)
|
||||
|
||||
# to remove the resurce bundle target.
|
||||
# When specify the "resource_bundles" in podspec, xcode will generate a bundle
|
||||
@ -230,8 +194,7 @@ module Pod
|
||||
end
|
||||
|
||||
# to avoid the warning of missing license
|
||||
spec.attributes_hash["license"] = {}
|
||||
|
||||
spec.attributes_hash["license"] = {}
|
||||
end
|
||||
|
||||
end
|
||||
@ -245,8 +208,6 @@ module Pod
|
||||
pod_installer = create_pod_installer(pod_name)
|
||||
# \copy from original
|
||||
|
||||
p self.prebuild_pod_names
|
||||
exit
|
||||
if self.prebuild_pod_names.include? pod_name
|
||||
pod_installer.install_for_prebuild!(self.sandbox)
|
||||
else
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# encoding: UTF-8
|
||||
require_relative 'extensions/podfile_options'
|
||||
require_relative 'helper/podfile_options'
|
||||
require_relative 'tool/tool'
|
||||
|
||||
module Pod
|
||||
@ -24,37 +24,6 @@ module Pod
|
||||
DSL.dont_remove_source_code = true
|
||||
end
|
||||
|
||||
# Add custom xcodebuild option to the prebuilding action
|
||||
#
|
||||
# You may use this for your special demands. For example: the default archs in dSYMs
|
||||
# of prebuilt frameworks is 'arm64 armv7 x86_64', and no 'i386' for 32bit simulator.
|
||||
# It may generate a warning when building for a 32bit simulator. You may add following
|
||||
# to your podfile
|
||||
#
|
||||
# ` set_custom_xcodebuild_options_for_prebuilt_frameworks :simulator => "ARCHS=$(ARCHS_STANDARD)" `
|
||||
#
|
||||
# Another example to disable the generating of dSYM file:
|
||||
#
|
||||
# ` set_custom_xcodebuild_options_for_prebuilt_frameworks "DEBUG_INFORMATION_FORMAT=dwarf"`
|
||||
#
|
||||
#
|
||||
# @param [String or Hash] options
|
||||
#
|
||||
# If is a String, it will apply for device and simulator. Use it just like in the commandline.
|
||||
# If is a Hash, it should be like this: { :device => "XXXXX", :simulator => "XXXXX" }
|
||||
#
|
||||
def set_custom_xcodebuild_options_for_prebuilt_frameworks(options)
|
||||
if options.kind_of? Hash
|
||||
DSL.custom_build_options = [ options[:device] ] unless options[:device].nil?
|
||||
DSL.custom_build_options_simulator = [ options[:simulator] ] unless options[:simulator].nil?
|
||||
elsif options.kind_of? String
|
||||
DSL.custom_build_options = [options]
|
||||
DSL.custom_build_options_simulator = [options]
|
||||
else
|
||||
raise "Wrong type."
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
class_attr_accessor :prebuild_all
|
||||
prebuild_all = false
|
||||
@ -64,21 +33,13 @@ module Pod
|
||||
|
||||
class_attr_accessor :dont_remove_source_code
|
||||
dont_remove_source_code = false
|
||||
|
||||
class_attr_accessor :custom_build_options
|
||||
class_attr_accessor :custom_build_options_simulator
|
||||
self.custom_build_options = []
|
||||
self.custom_build_options_simulator = []
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Pod::HooksManager.register('cocoapods-binary', :pre_install) do |installer_context|
|
||||
|
||||
require_relative 'data_flow'
|
||||
require_relative 'helper/context'
|
||||
require_relative 'helper/feature_switches'
|
||||
|
||||
if Pod.is_prebuild_stage
|
||||
next
|
||||
end
|
||||
@ -87,38 +48,36 @@ Pod::HooksManager.register('cocoapods-binary', :pre_install) do |installer_conte
|
||||
# check user_framework is on
|
||||
podfile = installer_context.podfile
|
||||
podfile.target_definition_list.each do |target_definition|
|
||||
next if target_definition.prebuild_framework_pod_names.empty?
|
||||
next if target_definition.prebuild_framework_names.empty?
|
||||
if not target_definition.uses_frameworks?
|
||||
STDERR.puts "[!] Cocoapods-binary requires `use_frameworks!`".red
|
||||
exit
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
# -- step 1: prebuild framework ---
|
||||
# Execute a sperated pod install, to generate targets for building framework,
|
||||
# then compile them to framework files.
|
||||
require_relative 'extensions/prebuild_sandbox'
|
||||
require_relative 'helper/prebuild_sandbox'
|
||||
require_relative 'Prebuild'
|
||||
|
||||
|
||||
Pod::UI.puts "🚀 Prebuild frameworks"
|
||||
|
||||
|
||||
|
||||
# Fetch original installer (which is running this pre-install hook) options,
|
||||
# then pass them to our installer to perform update if needed
|
||||
# Looks like this is the most appropriate way to figure out that something should be updated
|
||||
|
||||
|
||||
update = nil
|
||||
repo_update = nil
|
||||
|
||||
|
||||
include ObjectSpace
|
||||
ObjectSpace.each_object(Pod::Installer) { |installer|
|
||||
update = installer.update
|
||||
repo_update = installer.repo_update
|
||||
}
|
||||
|
||||
|
||||
# control features
|
||||
Pod::Prebuild::Context.in_prebuild_stage = true
|
||||
Pod.is_prebuild_stage = true
|
||||
Pod::Podfile::DSL.enable_prebuild_patch true # enable sikpping for prebuild targets
|
||||
Pod::Installer.force_disable_integration true # don't integrate targets
|
||||
@ -146,13 +105,11 @@ Pod::HooksManager.register('cocoapods-binary', :pre_install) do |installer_conte
|
||||
|
||||
|
||||
# reset the environment
|
||||
Pod::Prebuild::Context.in_prebuild_stage = false
|
||||
Pod.is_prebuild_stage = false
|
||||
Pod::Installer.force_disable_integration false
|
||||
Pod::Podfile::DSL.enable_prebuild_patch false
|
||||
Pod::Config.force_disable_write_lockfile false
|
||||
Pod::Installer.disable_install_complete_message false
|
||||
Pod::UserInterface.warnings = [] # clean the warning in the prebuild step, it's duplicated.
|
||||
|
||||
|
||||
# -- step 2: pod install ---
|
||||
|
||||
@ -1,89 +1,10 @@
|
||||
require_relative 'rome/build_framework'
|
||||
require_relative 'helper/filter_for_prebuild_project'
|
||||
require_relative 'helper/passer'
|
||||
require_relative 'helper/target_checker'
|
||||
require_relative 'helper/context'
|
||||
require_relative 'extensions/prebuild_sandbox'
|
||||
require_relative 'extensions/installer_prebuild_targets'
|
||||
require_relative 'data_flow'
|
||||
|
||||
|
||||
# patch prebuild ability
|
||||
module Pod
|
||||
|
||||
class Resolver
|
||||
patch_method_when(:resolve, Prebuild.prebuild_stage_condition) do |original_method, args|
|
||||
original_result = original_method.(*args)
|
||||
# keys: TargetDefinition (for aggregated targets)
|
||||
podfile = self.podfile
|
||||
filter_strategy = Prebuild::DataFlow.instance.pods_filter_strategy(podfile)
|
||||
|
||||
modified = original_result.each do |target_definition, dependencies|
|
||||
assert_type target_definition, Podfile::TargetDefinition
|
||||
dependencies.select do |resolver_spec|
|
||||
assert_type resolver_spec, Resolver::ResolverSpecification
|
||||
pod_name = resolver_spec.spec.root.name
|
||||
filter_strategy.call(pod_name)
|
||||
end
|
||||
end
|
||||
modified
|
||||
end
|
||||
|
||||
|
||||
# resolve
|
||||
end
|
||||
|
||||
class Installer
|
||||
|
||||
# class Analyzer
|
||||
# patch_method_when(:analyze, Prebuild.prebuild_stage_condition) do |original_method, args|
|
||||
# original_result = original_method.(*args)
|
||||
# assert_type original_result, Analyzer::AnalysisResult
|
||||
# # @podfile_state = podfile_state
|
||||
# # @specs_by_target = specs_by_target
|
||||
# # @specs_by_source = specs_by_source
|
||||
# # @specifications = specifications
|
||||
# # @sandbox_state = sandbox_state
|
||||
# # @targets = targets
|
||||
# # @pod_targets = pod_targets
|
||||
# # @podfile_dependency_cache = podfile_dependency_cache
|
||||
# original_result
|
||||
# end
|
||||
# end
|
||||
|
||||
# #### make the prebuild xcode project only contain prebuild pod ###
|
||||
# patch_method_before_when(:install!, Pod::Prebuild.prebuild_stage_condition) do
|
||||
#
|
||||
# podfile = self.podfile
|
||||
# filter_method = Prebuild::DataFlow.instance.podfile_dependency_filter_strategy(podfile)
|
||||
#
|
||||
# # modify the podfile in-place
|
||||
# podfile.target_definition_list.each do |target_definition|
|
||||
# # pod dependency
|
||||
# values = target_definition.send(:get_hash_value, 'dependencies')
|
||||
# next if values.nil?
|
||||
# values = values.select do |v|
|
||||
# pod = nil
|
||||
# if v.kind_of?(Hash)
|
||||
# pod = v.keys.first
|
||||
# elsif v.kind_of?(String)
|
||||
# pod = v
|
||||
# else
|
||||
# raise "unexpect type: #{v.inspect}"
|
||||
# end
|
||||
#
|
||||
# root_pod = Specification.root_name(pod)
|
||||
# filter_method.call(root_pod)
|
||||
# end
|
||||
# # modify the data directly
|
||||
# target_definition.send(:set_hash_value, 'dependencies', values)
|
||||
#
|
||||
# # podspec_dependencies
|
||||
# # TODO
|
||||
# end
|
||||
# end
|
||||
|
||||
|
||||
|
||||
|
||||
private
|
||||
|
||||
@ -122,9 +43,11 @@ module Pod
|
||||
unchanged = changes.unchanged
|
||||
deleted = changes.deleted
|
||||
|
||||
exsited_framework_pod_names = sandbox.exsited_framework_pod_names
|
||||
unchange_framework_names = (added + unchanged)
|
||||
|
||||
exsited_framework_names = sandbox.exsited_framework_names
|
||||
missing = unchanged.select do |pod_name|
|
||||
not exsited_framework_pod_names.include?(pod_name)
|
||||
not exsited_framework_names.include?(pod_name)
|
||||
end
|
||||
|
||||
needed = (added + changed + deleted + missing)
|
||||
@ -135,7 +58,7 @@ module Pod
|
||||
# The install method when have completed cache
|
||||
def install_when_cache_hit!
|
||||
# just print log
|
||||
self.sandbox.exsited_framework_target_names.each do |name|
|
||||
self.sandbox.exsited_framework_names.each do |name|
|
||||
UI.puts "Using #{name}"
|
||||
end
|
||||
end
|
||||
@ -159,25 +82,24 @@ module Pod
|
||||
deleted = changes.deleted
|
||||
|
||||
existed_framework_folder.mkdir unless existed_framework_folder.exist?
|
||||
exsited_framework_pod_names = sandbox.exsited_framework_pod_names
|
||||
exsited_framework_names = sandbox.exsited_framework_names
|
||||
|
||||
# additions
|
||||
missing = unchanged.select do |pod_name|
|
||||
not exsited_framework_pod_names.include?(pod_name)
|
||||
not exsited_framework_names.include?(pod_name)
|
||||
end
|
||||
|
||||
|
||||
root_names_to_update = (added + changed + missing)
|
||||
|
||||
# transform names to targets
|
||||
cache = []
|
||||
targets = root_names_to_update.map do |pod_name|
|
||||
tars = Pod.fast_get_targets_for_pod_name(pod_name, self.pod_targets, cache)
|
||||
if tars.nil? || tars.empty?
|
||||
raise "There's no target named (#{pod_name}) in Pod.xcodeproj.\n #{self.pod_targets.map(&:name)}" if tars.nil?
|
||||
end
|
||||
tars
|
||||
end.flatten
|
||||
name_to_target_hash = self.pod_targets.reduce({}) do |sum, target|
|
||||
sum[target.name] = target
|
||||
sum
|
||||
end
|
||||
targets = root_names_to_update.map do |root_name|
|
||||
name_to_target_hash[root_name]
|
||||
end || []
|
||||
|
||||
# add the dendencies
|
||||
dependency_targets = targets.map {|t| t.recursive_dependent_targets }.flatten.uniq || []
|
||||
@ -189,37 +111,22 @@ module Pod
|
||||
targets = targets.reject {|pod_target| sandbox.local?(pod_target.pod_name) }
|
||||
|
||||
|
||||
|
||||
# build!
|
||||
Pod::UI.puts "Prebuild frameworks (total #{targets.count})"
|
||||
Pod::Prebuild.remove_build_dir(sandbox_path)
|
||||
targets.each do |target|
|
||||
if !target.should_build?
|
||||
UI.puts "Prebuilding #{target.label}"
|
||||
next
|
||||
end
|
||||
next unless target.should_build?
|
||||
|
||||
output_path = sandbox.framework_folder_path_for_target_name(target.name)
|
||||
output_path = sandbox.framework_folder_path_for_pod_name(target.name)
|
||||
output_path.mkpath unless output_path.exist?
|
||||
Pod::Prebuild.build(sandbox_path, target, output_path, bitcode_enabled, Podfile::DSL.custom_build_options, Podfile::DSL.custom_build_options_simulator)
|
||||
Pod::Prebuild.build(sandbox_path, target, output_path, bitcode_enabled)
|
||||
|
||||
# save the resource paths for later installing
|
||||
if target.static_framework? and !target.resource_paths.empty?
|
||||
framework_path = output_path + target.framework_name
|
||||
standard_sandbox_path = sandbox.standard_sanbox_path
|
||||
|
||||
resources = begin
|
||||
if Pod::VERSION.start_with? "1.5"
|
||||
target.resource_paths
|
||||
else
|
||||
# resource_paths is Hash{String=>Array<String>} on 1.6 and above
|
||||
# (use AFNetworking to generate a demo data)
|
||||
# https://github.com/leavez/cocoapods-binary/issues/50
|
||||
target.resource_paths.values.flatten
|
||||
end
|
||||
end
|
||||
raise "Wrong type: #{resources}" unless resources.kind_of? Array
|
||||
|
||||
path_objects = resources.map do |path|
|
||||
path_objects = target.resource_paths.map do |path|
|
||||
object = Prebuild::Passer::ResourcePath.new
|
||||
object.real_file_path = framework_path + File.basename(path)
|
||||
object.target_file_path = path.gsub('${PODS_ROOT}', standard_sandbox_path.to_s) if path.start_with? '${PODS_ROOT}'
|
||||
@ -228,7 +135,6 @@ module Pod
|
||||
end
|
||||
Prebuild::Passer.resources_to_copy_for_static_framework[target.name] = path_objects
|
||||
end
|
||||
|
||||
end
|
||||
Pod::Prebuild.remove_build_dir(sandbox_path)
|
||||
|
||||
@ -236,12 +142,12 @@ module Pod
|
||||
# copy vendored libraries and frameworks
|
||||
targets.each do |target|
|
||||
root_path = self.sandbox.pod_dir(target.name)
|
||||
target_folder = sandbox.framework_folder_path_for_target_name(target.name)
|
||||
target_folder = sandbox.framework_folder_path_for_pod_name(target.name)
|
||||
|
||||
# If target shouldn't build, we copy all the original files
|
||||
# This is for target with only .a and .h files
|
||||
if not target.should_build?
|
||||
Prebuild::Passer.target_names_to_skip_integration_framework << target.name
|
||||
Prebuild::Passer.target_names_to_skip_integration_framework << target.pod_name
|
||||
FileUtils.cp_r(root_path, target_folder, :remove_destination => true)
|
||||
next
|
||||
end
|
||||
@ -259,20 +165,15 @@ module Pod
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# save the pod_name for prebuild framwork in sandbox
|
||||
targets.each do |target|
|
||||
sandbox.save_pod_name_for_target target
|
||||
end
|
||||
|
||||
# Remove useless files
|
||||
# remove useless pods
|
||||
all_needed_names = self.pod_targets.map(&:name).uniq
|
||||
useless_target_names = sandbox.exsited_framework_target_names.reject do |name|
|
||||
useless_names = sandbox.exsited_framework_names.reject do |name|
|
||||
all_needed_names.include? name
|
||||
end
|
||||
useless_target_names.each do |name|
|
||||
path = sandbox.framework_folder_path_for_target_name(name)
|
||||
useless_names.each do |name|
|
||||
path = sandbox.framework_folder_path_for_pod_name(name)
|
||||
path.rmtree if path.exist?
|
||||
end
|
||||
|
||||
@ -295,8 +196,8 @@ module Pod
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
# patch the post install hook
|
||||
old_method2 = instance_method(:run_plugins_post_install_hooks)
|
||||
define_method(:run_plugins_post_install_hooks) do
|
||||
|
||||
@ -1,193 +0,0 @@
|
||||
require_relative 'tool/tool'
|
||||
|
||||
# # BACKGROUND
|
||||
#
|
||||
# ## ABOUT NAMES
|
||||
#
|
||||
# There are many kinds of name in cocoapods. Two main names are widely used in this plugin:
|
||||
#
|
||||
# - root_spec.name (spec.root_name, target.pod_name):
|
||||
# aka "pod_name"
|
||||
# the name we use in podfile. the concept.
|
||||
#
|
||||
# - target.name:
|
||||
# aka "target_name"
|
||||
# the name of the final target in xcode project. The final real thing.
|
||||
#
|
||||
# One pod may have multiple targets in xcode project, due to one pod can be used in multiple
|
||||
# platform simultaneously. So one `root_spec.name` may have multiple corresponding `target.name`s.
|
||||
# Therefore, map a spec to/from targets is a little complicated. It's one to many relation (spec -> targets).
|
||||
#
|
||||
# Despite the multiple platform, there's another situation to have multiple target, subspec.
|
||||
# If 2 targets of same platform in podfile all have Pod A, one have 'A/sub1', 'A/sub2', the other
|
||||
# have 'A/sub1', there will be 2 pod targets in Pod.xcodeproj: A-sub1-sub2, A-sub1
|
||||
#
|
||||
#
|
||||
# # OUR RULES
|
||||
#
|
||||
# For simplicity, we have set several rules:
|
||||
#
|
||||
# 1. Any part of the pod is set to binary, all the pod should be binary
|
||||
# 2. Dependencies of a binary is also binary be default, except disabled explicitly.
|
||||
# 3. Don't support for the different subspec lead to multiple pod targets case.
|
||||
#
|
||||
# For the first rule, for example, a subspec is binary while others are not, or in one target is
|
||||
# binary while in another is not. All the source code in this pod should be binary)
|
||||
#
|
||||
# For the rule 3, it's a limitation. Solving it is not deserved as subspecs may contain duplicated
|
||||
# contents. It may happens when
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
module Pod
|
||||
class Prebuild
|
||||
|
||||
# This class provides core data flow manipulations, illustrating
|
||||
# how 'pod_name', 'target' and 'spec' transfer between each other.
|
||||
#
|
||||
# We just process the model data here, no real action.
|
||||
class DataFlow
|
||||
|
||||
include Singleton
|
||||
|
||||
|
||||
################ 1 filter the podfile for prebuild ################
|
||||
|
||||
# Filter the dependencies pod in podfile, only keep the prebuilt.
|
||||
# This method return a Proc, which can be use to modify the podfile
|
||||
#
|
||||
# @param [Podfile] podfile
|
||||
# @return [Proc(String(pod_name) -> Bool)]
|
||||
def pods_filter_strategy(podfile)
|
||||
|
||||
# We do use this filter method, rather than just hack the pod function,
|
||||
# because the latter can not handle subspec of different binary state.
|
||||
|
||||
target_definitions = podfile.target_definition_list
|
||||
|
||||
all_explicit_pod_names = target_definitions.map do |td|
|
||||
td.prebuild_framework_pod_names(inherent_parent: false)
|
||||
end.flatten
|
||||
|
||||
all_explicit_pod_names = Set.new(all_explicit_pod_names)
|
||||
|
||||
# # get all dependencies
|
||||
# # keep in the podfile
|
||||
# dependency_pod_names = target_definitions.map do |td|
|
||||
# td.prebuild_framework_pod_names(inherent_parent: false)
|
||||
# end.flatten
|
||||
|
||||
return Proc.new do |pod_name|
|
||||
all_explicit_pod_names.include? pod_name
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# Get the prebuild targets, which will be transformed to binary framework finally.
|
||||
# (It doesn't means the target will actually perform a build action, as there may be a cache.)
|
||||
#
|
||||
# @param [Podfile] podfile
|
||||
# @param [Array<PodTargets>] pod_targets_in_prebuild_project
|
||||
# The pod_targets of prebuild project, which have been filtered by `podfile_dependency_filter_strategy`.
|
||||
# It should contain the targets to prebuild and it's dependencies.
|
||||
#
|
||||
# @return [Array<PodTarget>]
|
||||
def get_prebuild_targets(podfile, pod_targets_in_prebuild_project)
|
||||
|
||||
target_definitions = podfile.target_definition_list
|
||||
|
||||
all_explicit_pod_names = Set.new(target_definitions.map do |td|
|
||||
td.prebuild_framework_pod_names(inherent_parent: false)
|
||||
end.flatten)
|
||||
|
||||
explicitly_disabled_pod_names = Set.new(target_definitions.map do |td|
|
||||
td.should_not_prebuild_framework_pod_names(inherent_parent: false)
|
||||
end.flatten)
|
||||
|
||||
explicitly_disabled_pod_names -= all_explicit_pod_names
|
||||
|
||||
return pod_targets_in_prebuild_project.reject do |target|
|
||||
explicitly_disabled_pod_names.include?(target.pod_name) || target.specs.any?{|s| s.root.local?}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
################ 2 generating project and build ###################
|
||||
|
||||
# saved all the prebuilt pod names here
|
||||
# @return [Array<String>]
|
||||
attr_accessor :prebuilt_pod_names
|
||||
|
||||
# saved all the prebuilt target names
|
||||
# @return [Array<String>]
|
||||
attr_accessor :prebuild_target_names
|
||||
|
||||
# @param [Array<PodTarget>] pod_targets
|
||||
# @return [Void]
|
||||
def save_prebuilt_names(pod_targets)
|
||||
prebuilt_pod_names = pod_targets.map(&pod_name).uniq
|
||||
end
|
||||
|
||||
|
||||
################ 3 output frameworks ##############################
|
||||
|
||||
class TargetPersistenceInfo
|
||||
# meta info
|
||||
attr_accessor :target_name # [String]
|
||||
attr_accessor :additional_info # [TargetAdditionalInfo]
|
||||
|
||||
# paths
|
||||
attr_accessor :persistence_root_folder # [Pathname]
|
||||
attr_accessor :framework_file_path # [Pathname]
|
||||
attr_accessor :other_resources_folder # [Pathname]
|
||||
attr_accessor :additional_info_path # [Pathname]
|
||||
end
|
||||
|
||||
class TargetAdditionalInfo
|
||||
attr_accessor :target_name # [String]
|
||||
attr_accessor :corresponding_pod_name # [String]
|
||||
attr_accessor :target_identifier # TODO
|
||||
end
|
||||
|
||||
# Generate the persistence meta info for a target, which will be
|
||||
# used in saving framework.
|
||||
#
|
||||
# @param [PodTarget] target
|
||||
# @return [TargetPersistenceInfo]
|
||||
def persistence_info_for_target(target)
|
||||
|
||||
end
|
||||
|
||||
|
||||
########### 4 install built frameworks (Integration Stage) #####
|
||||
|
||||
# Get all the prebuilt targets saved in the Pod/_Prebuild folder
|
||||
#
|
||||
# @return [Array<TargetPersistenceInfo>]
|
||||
def prebuilt_targets_infos
|
||||
|
||||
end
|
||||
|
||||
|
||||
################ 5 modify specs ################################
|
||||
|
||||
class SpecModification
|
||||
attr_accessor :spec
|
||||
attr_accessor :framework_path
|
||||
attr_accessor :framework_path_by_platform
|
||||
end
|
||||
|
||||
# Generate the meta info for modify specs
|
||||
#
|
||||
# @param [Array<Specification>] all_specs
|
||||
# @return [Array<SpecModification>]
|
||||
def get_spec_modification_infos(all_specs)
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -1,80 +0,0 @@
|
||||
require_relative '../data_flow'
|
||||
require_relative '../helper/context'
|
||||
|
||||
module Pod
|
||||
class Installer
|
||||
|
||||
# Get the all the prebuild targets
|
||||
# It can only be called at the prebuild installer
|
||||
#
|
||||
# @return [Array<PodTarget>]
|
||||
def prebuild_pod_targets
|
||||
assert Prebuild::Context.in_prebuild_stage
|
||||
@prebuild_pod_targets ||= (
|
||||
Prebuild::DataFlow.instance.get_prebuild_targets(self.podfile, self.pod_targets)
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def __prebuild_pod_targets
|
||||
@prebuild_pod_targets ||= (
|
||||
all = []
|
||||
|
||||
aggregate_targets = self.aggregate_targets
|
||||
aggregate_targets.each do |aggregate_target|
|
||||
target_definition = aggregate_target.target_definition
|
||||
targets = aggregate_target.pod_targets || []
|
||||
|
||||
# filter prebuild
|
||||
prebuild_names = target_definition.prebuild_framework_pod_names
|
||||
if not Podfile::DSL.prebuild_all
|
||||
targets = targets.select { |pod_target| prebuild_names.include?(pod_target.pod_name) }
|
||||
end
|
||||
dependency_targets = targets.map {|t| t.recursive_dependent_targets }.flatten.uniq || []
|
||||
targets = (targets + dependency_targets).uniq
|
||||
|
||||
# filter should not prebuild
|
||||
explict_should_not_names = target_definition.should_not_prebuild_framework_pod_names
|
||||
targets = targets.reject { |pod_target| explict_should_not_names.include?(pod_target.pod_name) }
|
||||
|
||||
all += targets
|
||||
end
|
||||
|
||||
all = all.reject {|pod_target| sandbox.local?(pod_target.pod_name) }
|
||||
all.uniq
|
||||
)
|
||||
end
|
||||
|
||||
# the root names who needs prebuild, including dependency pods.
|
||||
def prebuild_pod_names
|
||||
@prebuild_pod_names ||= self.__prebuild_pod_targets.map(&:pod_name)
|
||||
end
|
||||
|
||||
|
||||
def validate_every_pod_only_have_one_form
|
||||
|
||||
multi_targets_pods = self.pod_targets.group_by do |t|
|
||||
t.pod_name
|
||||
end.select do |k, v|
|
||||
v.map{|t| t.platform.name }.count > 1
|
||||
end
|
||||
|
||||
multi_targets_pods = multi_targets_pods.reject do |name, targets|
|
||||
contained = targets.map{|t| self.__prebuild_pod_targets.include? t }
|
||||
contained.uniq.count == 1 # all equal
|
||||
end
|
||||
|
||||
return if multi_targets_pods.empty?
|
||||
|
||||
warnings = "One pod can only be prebuilt or not prebuilt. These pod have different forms in multiple targets:\n"
|
||||
warnings += multi_targets_pods.map{|name, targets| " #{name}: #{targets.map{|t|t.platform.name}}"}.join("\n")
|
||||
raise Informative, warnings
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -1,66 +0,0 @@
|
||||
module Pod
|
||||
|
||||
class Prebuild
|
||||
def self.keyword
|
||||
:binary
|
||||
end
|
||||
end
|
||||
|
||||
class Podfile
|
||||
class TargetDefinition
|
||||
|
||||
## --- option for setting using prebuild framework ---
|
||||
def parse_prebuild_framework(name, requirements)
|
||||
should_prebuild = Pod::Podfile::DSL.prebuild_all
|
||||
|
||||
options = requirements.last
|
||||
if options.is_a?(Hash) && options[Pod::Prebuild.keyword] != nil
|
||||
should_prebuild = options.delete(Pod::Prebuild.keyword)
|
||||
requirements.pop if options.empty?
|
||||
end
|
||||
|
||||
pod_name = Specification.root_name(name)
|
||||
set_prebuild_for_pod(pod_name, should_prebuild)
|
||||
end
|
||||
|
||||
def set_prebuild_for_pod(pod_name, should_prebuild)
|
||||
|
||||
if should_prebuild == true
|
||||
@prebuild_framework_pod_names ||= []
|
||||
@prebuild_framework_pod_names.push pod_name
|
||||
else
|
||||
@should_not_prebuild_framework_pod_names ||= []
|
||||
@should_not_prebuild_framework_pod_names.push pod_name
|
||||
end
|
||||
end
|
||||
|
||||
def prebuild_framework_pod_names(inherent_parent: true)
|
||||
names = @prebuild_framework_pod_names || []
|
||||
if inherent_parent && parent != nil and parent.kind_of? TargetDefinition
|
||||
names += parent.prebuild_framework_pod_names
|
||||
end
|
||||
names
|
||||
end
|
||||
def should_not_prebuild_framework_pod_names(inherent_parent: true)
|
||||
names = @should_not_prebuild_framework_pod_names || []
|
||||
if inherent_parent && parent != nil and parent.kind_of?(TargetDefinition)
|
||||
names += parent.should_not_prebuild_framework_pod_names
|
||||
end
|
||||
names
|
||||
end
|
||||
|
||||
# ---- patch method ----
|
||||
# We want modify `store_pod` method, but it's hard to insert a line in the
|
||||
# implementation. So we patch a method called in `store_pod`.
|
||||
old_method = instance_method(:parse_inhibit_warnings)
|
||||
|
||||
define_method(:parse_inhibit_warnings) do |name, requirements|
|
||||
parse_prebuild_framework(name, requirements)
|
||||
old_method.bind(self).(name, requirements)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -1,73 +0,0 @@
|
||||
require_relative "../helper/names"
|
||||
|
||||
module Pod
|
||||
class PrebuildSandbox < Sandbox
|
||||
|
||||
# [String] standard_sandbox_path
|
||||
def self.from_standard_sanbox_path(path)
|
||||
prebuild_sandbox_path = Pathname.new(path).realpath + "_Prebuild"
|
||||
self.new(prebuild_sandbox_path)
|
||||
end
|
||||
|
||||
def self.from_standard_sandbox(sandbox)
|
||||
self.from_standard_sanbox_path(sandbox.root)
|
||||
end
|
||||
|
||||
def standard_sanbox_path
|
||||
self.root.parent
|
||||
end
|
||||
|
||||
def generate_framework_path
|
||||
self.root + "GeneratedFrameworks"
|
||||
end
|
||||
|
||||
# @param name [String] pass the target.name (may containing platform suffix)
|
||||
# @return [Pathname] the folder containing the framework file.
|
||||
def framework_folder_path_for_target_name(name)
|
||||
self.generate_framework_path + name
|
||||
end
|
||||
|
||||
|
||||
def exsited_framework_target_names
|
||||
exsited_framework_name_pairs.map {|pair| pair[0]}.uniq
|
||||
end
|
||||
def exsited_framework_pod_names
|
||||
exsited_framework_name_pairs.map {|pair| pair[1]}.uniq
|
||||
end
|
||||
def existed_target_names_for_pod_name(pod_name)
|
||||
exsited_framework_name_pairs.select {|pair| pair[1] == pod_name }.map { |pair| pair[0]}
|
||||
end
|
||||
|
||||
|
||||
|
||||
def save_pod_name_for_target(target)
|
||||
folder = framework_folder_path_for_target_name(target.name)
|
||||
return unless folder.exist?
|
||||
flag_file_path = folder + "#{target.pod_name}.pod_name"
|
||||
File.write(flag_file_path.to_s, "")
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
|
||||
def pod_name_for_target_folder(target_folder_path)
|
||||
name = Pathname.new(target_folder_path).children.find do |child|
|
||||
child.to_s.end_with? ".pod_name"
|
||||
end
|
||||
name = name.basename(".pod_name").to_s unless name.nil?
|
||||
name ||= Pathname.new(target_folder_path).basename.to_s # for compatibility with older version
|
||||
end
|
||||
|
||||
# Array<[target_name, pod_name]>
|
||||
def exsited_framework_name_pairs
|
||||
return [] unless generate_framework_path.exist?
|
||||
generate_framework_path.children().map do |framework_path|
|
||||
if framework_path.directory? && (not framework_path.children.empty?)
|
||||
[framework_path.basename.to_s, pod_name_for_target_folder(framework_path)]
|
||||
else
|
||||
nil
|
||||
end
|
||||
end.reject(&:nil?).uniq
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -1,3 +1,3 @@
|
||||
module CocoapodsBinary
|
||||
VERSION = "0.4.4"
|
||||
VERSION = "0.4.2"
|
||||
end
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
require_relative '../tool/tool'
|
||||
|
||||
module Pod
|
||||
class Prebuild
|
||||
|
||||
|
||||
class Context
|
||||
class_attr_accessor :in_prebuild_stage
|
||||
end
|
||||
|
||||
|
||||
# Convenient method to return the condition proc object for patch.
|
||||
# It indicates whether we are in prebuild stage.
|
||||
# @return [Proc]
|
||||
def self.prebuild_stage_condition
|
||||
Proc.new do
|
||||
Context.in_prebuild_stage
|
||||
end
|
||||
end
|
||||
|
||||
def self.integration_stage_condition
|
||||
Proc.new do
|
||||
!Context.in_prebuild_stage
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -1,5 +1,5 @@
|
||||
require 'cocoapods-binary/tool/tool'
|
||||
require_relative '../extensions/prebuild_sandbox'
|
||||
require_relative '../tool/tool'
|
||||
require_relative 'prebuild_sandbox'
|
||||
|
||||
module Pod
|
||||
|
||||
@ -18,7 +18,34 @@ module Pod
|
||||
@@enable_prebuild_patch = value
|
||||
end
|
||||
|
||||
# --- patch ---
|
||||
old_method = instance_method(:pod)
|
||||
|
||||
define_method(:pod) do |name, *args|
|
||||
if !@@enable_prebuild_patch
|
||||
old_method.bind(self).(name, *args)
|
||||
return
|
||||
end
|
||||
|
||||
# patched content
|
||||
should_prebuild = Pod::Podfile::DSL.prebuild_all
|
||||
local = false
|
||||
|
||||
options = args.last
|
||||
if options.is_a?(Hash) and options[Pod::Prebuild.keyword] != nil
|
||||
should_prebuild = options[Pod::Prebuild.keyword]
|
||||
local = (options[:path] != nil)
|
||||
end
|
||||
|
||||
if should_prebuild and (not local)
|
||||
if current_target_definition.platform == :watchos
|
||||
# watchos isn't supported currently
|
||||
Pod::UI.warn "Binary doesn't support watchos currently: #{name}. You can manually set `binary => false` for this pod to suppress this warning."
|
||||
return
|
||||
end
|
||||
old_method.bind(self).(name, *args)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -32,7 +59,7 @@ module Pod
|
||||
old_method = instance_method(:integrate_user_project)
|
||||
define_method(:integrate_user_project) do
|
||||
if @@force_disable_integration
|
||||
next
|
||||
return
|
||||
end
|
||||
old_method.bind(self).()
|
||||
end
|
||||
@ -47,7 +74,7 @@ module Pod
|
||||
old_method = instance_method(:print_post_install_message)
|
||||
define_method(:print_post_install_message) do
|
||||
if @@disable_install_complete_message
|
||||
next
|
||||
return
|
||||
end
|
||||
old_method.bind(self).()
|
||||
end
|
||||
@ -65,9 +92,9 @@ module Pod
|
||||
define_method(:lockfile_path) do
|
||||
if @@force_disable_write_lockfile
|
||||
# As config is a singleton, sandbox_root refer to the standard sandbox.
|
||||
next PrebuildSandbox.from_standard_sanbox_path(sandbox_root).root + 'Manifest.lock.tmp'
|
||||
return PrebuildSandbox.from_standard_sanbox_path(sandbox_root).root + 'Manifest.lock.tmp'
|
||||
else
|
||||
next old_method.bind(self).()
|
||||
return old_method.bind(self).()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -1,80 +0,0 @@
|
||||
require_relative '../extensions/podfile_options'
|
||||
|
||||
module Pod
|
||||
|
||||
# Patch the podfile to let podfile only contain prebuild pods
|
||||
# class Podfile
|
||||
#
|
||||
# class << self
|
||||
#
|
||||
# patch_method :from_ruby do |old_method, args|
|
||||
# podfile = old_method.(*args)
|
||||
# p podfile.root_target_definitions
|
||||
# podfile
|
||||
# end
|
||||
#
|
||||
# end
|
||||
#
|
||||
# end
|
||||
# class Installer
|
||||
#
|
||||
# patch_method_before :install! do |*args|
|
||||
# # manipulate the podfile, filter the binary pod
|
||||
# if
|
||||
# p podfile.root_target_definitions
|
||||
# end
|
||||
# end
|
||||
|
||||
class Prebuild
|
||||
|
||||
# @param [Podfile] podfile
|
||||
def self.filter_podfile_content_for_prebuild_stage(podfile)
|
||||
|
||||
target_definitions = podfile.target_definition_list
|
||||
|
||||
all_explicit_pod_names = Set.new(target_definitions.map do |td|
|
||||
td.prebuild_framework_pod_names(inherent_parent: false)
|
||||
end.flatten)
|
||||
|
||||
|
||||
target_definitions.each do |target_definition|
|
||||
# pod dependency
|
||||
values = target_definition.send(:get_hash_value, 'dependencies')
|
||||
next if values.nil?
|
||||
values = values.select do |v|
|
||||
pod = nil
|
||||
if v.kind_of?(Hash)
|
||||
pod = v.keys.first
|
||||
elsif v.kind_of?(String)
|
||||
pod = v
|
||||
else
|
||||
raise "unexpect type: #{v.inspect}"
|
||||
end
|
||||
|
||||
root_pod = Specification.root_name(pod)
|
||||
all_explicit_pod_names.include?(root_pod)
|
||||
end
|
||||
# modify the data directly
|
||||
target_definition.send(:set_hash_value, 'dependencies', values)
|
||||
|
||||
|
||||
# podspec dependency
|
||||
# podspec_dependencies
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
private def walk_the_tree(targets_definitions, &action)
|
||||
return if targets_definitions.nil?
|
||||
targets_definitions.each do |t|
|
||||
action.call(t)
|
||||
walk_the_tree(t.children, &action)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
@ -1,78 +0,0 @@
|
||||
# ABOUT NAMES
|
||||
#
|
||||
# There are many kinds of name in cocoapods. Two main names are widely used in this plugin.
|
||||
# - root_spec.name (spec.root_name, targe.pod_name):
|
||||
# aka "pod_name"
|
||||
# the name we use in podfile. the concept.
|
||||
#
|
||||
# - target.name:
|
||||
# aka "target_name"
|
||||
# the name of the final target in xcode project. the final real thing.
|
||||
#
|
||||
# One pod may have multiple targets in xcode project, due to one pod can be used in mutiple
|
||||
# platform simultaneously. So one `root_spec.name` may have multiple coresponding `target.name`s.
|
||||
# Therefore, map a spec to/from targets is a little complecated. It's one to many.
|
||||
#
|
||||
|
||||
# Tool to transform Pod_name to target efficiently
|
||||
module Pod
|
||||
def self.fast_get_targets_for_pod_name(pod_name, targets, cache)
|
||||
pod_name_to_targets_hash = nil
|
||||
if cache.empty?
|
||||
pod_name_to_targets_hash = targets.reduce({}) do |sum, target|
|
||||
array = sum[target.pod_name] || []
|
||||
array << target
|
||||
sum[target.pod_name] = array
|
||||
sum
|
||||
end
|
||||
cache << pod_name_to_targets_hash
|
||||
else
|
||||
pod_name_to_targets_hash = cache.first
|
||||
end
|
||||
|
||||
pod_name_to_targets_hash[pod_name] || []
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Target:
|
||||
|
||||
# def pod_name
|
||||
# root_spec.name
|
||||
# end
|
||||
|
||||
# def name
|
||||
# pod_name + #{scope_suffix}
|
||||
# end
|
||||
|
||||
# def product_module_name
|
||||
# root_spec.module_name
|
||||
# end
|
||||
|
||||
# def framework_name
|
||||
# "#{product_module_name}.framework"
|
||||
# end
|
||||
|
||||
# def product_name
|
||||
# if requires_frameworks?
|
||||
# framework_name
|
||||
# else
|
||||
# static_library_name
|
||||
# end
|
||||
# end
|
||||
|
||||
# def product_basename
|
||||
# if requires_frameworks?
|
||||
# product_module_name
|
||||
# else
|
||||
# label
|
||||
# end
|
||||
# end
|
||||
|
||||
# def framework_name
|
||||
# "#{product_module_name}.framework"
|
||||
# end
|
||||
110
lib/cocoapods-binary/helper/podfile_options.rb
Normal file
110
lib/cocoapods-binary/helper/podfile_options.rb
Normal file
@ -0,0 +1,110 @@
|
||||
module Pod
|
||||
|
||||
class Prebuild
|
||||
def self.keyword
|
||||
:binary
|
||||
end
|
||||
end
|
||||
|
||||
class Podfile
|
||||
class TargetDefinition
|
||||
|
||||
## --- option for setting using prebuild framework ---
|
||||
def parse_prebuild_framework(name, requirements)
|
||||
should_prebuild = Pod::Podfile::DSL.prebuild_all
|
||||
|
||||
options = requirements.last
|
||||
if options.is_a?(Hash) && options[Pod::Prebuild.keyword] != nil
|
||||
should_prebuild = options.delete(Pod::Prebuild.keyword)
|
||||
requirements.pop if options.empty?
|
||||
end
|
||||
|
||||
pod_name = Specification.root_name(name)
|
||||
set_prebuild_for_pod(pod_name, should_prebuild)
|
||||
end
|
||||
|
||||
def set_prebuild_for_pod(pod_name, should_prebuild)
|
||||
|
||||
if should_prebuild == true
|
||||
# watchos isn't supported currently
|
||||
return if self.platform == :watchos
|
||||
|
||||
@prebuild_framework_names ||= []
|
||||
@prebuild_framework_names.push pod_name
|
||||
else
|
||||
@should_not_prebuild_framework_names ||= []
|
||||
@should_not_prebuild_framework_names.push pod_name
|
||||
end
|
||||
end
|
||||
|
||||
def prebuild_framework_names
|
||||
names = @prebuild_framework_names || []
|
||||
if parent != nil and parent.kind_of? TargetDefinition
|
||||
names += parent.prebuild_framework_names
|
||||
end
|
||||
names
|
||||
end
|
||||
def should_not_prebuild_framework_names
|
||||
names = @should_not_prebuild_framework_names || []
|
||||
if parent != nil and parent.kind_of? TargetDefinition
|
||||
names += parent.should_not_prebuild_framework_names
|
||||
end
|
||||
names
|
||||
end
|
||||
|
||||
# ---- patch method ----
|
||||
# We want modify `store_pod` method, but it's hard to insert a line in the
|
||||
# implementation. So we patch a method called in `store_pod`.
|
||||
old_method = instance_method(:parse_inhibit_warnings)
|
||||
|
||||
define_method(:parse_inhibit_warnings) do |name, requirements|
|
||||
parse_prebuild_framework(name, requirements)
|
||||
old_method.bind(self).(name, requirements)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
module Pod
|
||||
class Installer
|
||||
|
||||
def prebuild_pod_targets
|
||||
|
||||
all = []
|
||||
|
||||
aggregate_targets = self.aggregate_targets.select { |a| a.platform != :watchos }
|
||||
aggregate_targets.each do |aggregate_target|
|
||||
target_definition = aggregate_target.target_definition
|
||||
targets = aggregate_target.pod_targets || []
|
||||
|
||||
# filter prebuild
|
||||
prebuild_names = target_definition.prebuild_framework_names
|
||||
if not Podfile::DSL.prebuild_all
|
||||
targets = targets.select { |pod_target| prebuild_names.include?(pod_target.pod_name) }
|
||||
end
|
||||
dependency_targets = targets.map {|t| t.recursive_dependent_targets }.flatten.uniq || []
|
||||
targets = (targets + dependency_targets).uniq
|
||||
|
||||
# filter should not prebuild
|
||||
explict_should_not_names = target_definition.should_not_prebuild_framework_names
|
||||
targets = targets.reject { |pod_target| explict_should_not_names.include?(pod_target.pod_name) }
|
||||
|
||||
all += targets
|
||||
end
|
||||
|
||||
all = all.reject {|pod_target| sandbox.local?(pod_target.pod_name) }
|
||||
all.uniq
|
||||
end
|
||||
|
||||
# the root names who needs prebuild, including dependency pods.
|
||||
def prebuild_pod_names
|
||||
@prebuild_pod_names ||= self.prebuild_pod_targets.map(&:pod_name)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
49
lib/cocoapods-binary/helper/prebuild_sandbox.rb
Normal file
49
lib/cocoapods-binary/helper/prebuild_sandbox.rb
Normal file
@ -0,0 +1,49 @@
|
||||
module Pod
|
||||
class PrebuildSandbox < Sandbox
|
||||
|
||||
# [String] standard_sandbox_path
|
||||
def self.from_standard_sanbox_path(path)
|
||||
prebuild_sandbox_path = Pathname.new(path).realpath + "_Prebuild"
|
||||
self.new(prebuild_sandbox_path)
|
||||
end
|
||||
|
||||
def self.from_standard_sandbox(sandbox)
|
||||
self.from_standard_sanbox_path(sandbox.root)
|
||||
end
|
||||
|
||||
def standard_sanbox_path
|
||||
self.root.parent
|
||||
end
|
||||
|
||||
def generate_framework_path
|
||||
self.root + "GeneratedFrameworks"
|
||||
end
|
||||
|
||||
def framework_folder_path_for_pod_name(name)
|
||||
self.generate_framework_path + name
|
||||
end
|
||||
|
||||
def exsited_framework_names
|
||||
return [] unless generate_framework_path.exist?
|
||||
generate_framework_path.children().map do |framework_name|
|
||||
if framework_name.directory?
|
||||
if not framework_name.children.empty?
|
||||
File.basename(framework_name)
|
||||
else
|
||||
nil
|
||||
end
|
||||
else
|
||||
nil
|
||||
end
|
||||
end.reject(&:nil?)
|
||||
end
|
||||
|
||||
def framework_existed?(root_name)
|
||||
return false unless generate_framework_path.exist?
|
||||
generate_framework_path.children().any? do |child|
|
||||
child.basename.to_s == root_name
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
@ -1,49 +0,0 @@
|
||||
|
||||
module Pod
|
||||
class Prebuild
|
||||
|
||||
# Check the targets, for the current limitation of the plugin
|
||||
#
|
||||
# @param [Array<PodTarget>] prebuilt_targets
|
||||
def self.check_one_pod_should_have_only_one_target(prebuilt_targets)
|
||||
|
||||
targets_have_different_platforms = prebuilt_targets.select {|t| t.pod_name != t.name }
|
||||
|
||||
if targets_have_different_platforms.count > 0
|
||||
names = targets_have_different_platforms.map(&:pod_name)
|
||||
raw_names = targets_have_different_platforms.map(&:name)
|
||||
message = "Oops, you came across a limitation of cocoapods-binary.
|
||||
|
||||
The plugin requires that one pod should have ONLY ONE target in the 'Pod.xcodeproj'. There are mainly 2 situations \
|
||||
causing this problem:
|
||||
|
||||
1. One pod integrates in 2 or more different platforms' targets. e.g.
|
||||
```
|
||||
target 'iphoneApp' do
|
||||
pod 'A', :binary => true
|
||||
end
|
||||
target 'watchApp' do
|
||||
pod 'A'
|
||||
end
|
||||
```
|
||||
|
||||
2. Use different subspecs in multiple targets. e.g.
|
||||
```
|
||||
target 'iphoneApp' do
|
||||
pod 'A/core'
|
||||
pod 'A/network'
|
||||
end
|
||||
target 'iphoneAppTest' do
|
||||
pod 'A/core'
|
||||
end
|
||||
```
|
||||
|
||||
Related pods: #{names}, target names: #{raw_names}
|
||||
"
|
||||
raise Informative, message
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
@ -1,5 +1,4 @@
|
||||
require 'fourflusher'
|
||||
require 'xcpretty'
|
||||
|
||||
CONFIGURATION = "Release"
|
||||
PLATFORMS = { 'iphonesimulator' => 'iOS',
|
||||
@ -16,92 +15,58 @@ def build_for_iosish_platform(sandbox,
|
||||
target,
|
||||
device,
|
||||
simulator,
|
||||
bitcode_enabled,
|
||||
custom_build_options = [], # Array<String>
|
||||
custom_build_options_simulator = [] # Array<String>
|
||||
)
|
||||
bitcode_enabled)
|
||||
|
||||
deployment_target = target.platform.deployment_target.to_s
|
||||
|
||||
target_label = target.label # name with platform if it's used in multiple platforms
|
||||
target_label = target.label
|
||||
Pod::UI.puts "Prebuilding #{target_label}..."
|
||||
|
||||
other_options = []
|
||||
# bitcode enabled
|
||||
other_options += ['BITCODE_GENERATION_MODE=bitcode'] if bitcode_enabled
|
||||
# make less arch to iphone simulator for faster build
|
||||
custom_build_options_simulator += ['ARCHS=x86_64', 'ONLY_ACTIVE_ARCH=NO'] if simulator == 'iphonesimulator'
|
||||
|
||||
is_succeed, _ = xcodebuild(sandbox, target_label, device, deployment_target, other_options + custom_build_options)
|
||||
exit 1 unless is_succeed
|
||||
is_succeed, _ = xcodebuild(sandbox, target_label, simulator, deployment_target, other_options + custom_build_options_simulator)
|
||||
exit 1 unless is_succeed
|
||||
other_options = []
|
||||
if bitcode_enabled
|
||||
other_options += ['BITCODE_GENERATION_MODE=bitcode']
|
||||
end
|
||||
xcodebuild(sandbox, target_label, device, deployment_target, other_options)
|
||||
xcodebuild(sandbox, target_label, simulator, deployment_target, other_options + ['ARCHS=x86_64', 'ONLY_ACTIVE_ARCH=NO'])
|
||||
|
||||
# paths
|
||||
target_name = target.name # equals target.label, like "AFNeworking-iOS" when AFNetworking is used in multiple platforms.
|
||||
root_name = target.pod_name
|
||||
module_name = target.product_module_name
|
||||
device_framework_path = "#{build_dir}/#{CONFIGURATION}-#{device}/#{target_name}/#{module_name}.framework"
|
||||
simulator_framework_path = "#{build_dir}/#{CONFIGURATION}-#{simulator}/#{target_name}/#{module_name}.framework"
|
||||
device_framwork_path = "#{build_dir}/#{CONFIGURATION}-#{device}/#{root_name}/#{module_name}.framework"
|
||||
simulator_framwork_path = "#{build_dir}/#{CONFIGURATION}-#{simulator}/#{root_name}/#{module_name}.framework"
|
||||
|
||||
device_binary = device_framework_path + "/#{module_name}"
|
||||
simulator_binary = simulator_framework_path + "/#{module_name}"
|
||||
device_binary = device_framwork_path + "/#{module_name}"
|
||||
simulator_binary = simulator_framwork_path + "/#{module_name}"
|
||||
return unless File.file?(device_binary) && File.file?(simulator_binary)
|
||||
|
||||
# the device_lib path is the final output file path
|
||||
# combine the binaries
|
||||
tmp_lipoed_binary_path = "#{build_dir}/#{target_name}"
|
||||
# combine the bianries
|
||||
tmp_lipoed_binary_path = "#{build_dir}/#{root_name}"
|
||||
lipo_log = `lipo -create -output #{tmp_lipoed_binary_path} #{device_binary} #{simulator_binary}`
|
||||
puts lipo_log unless File.exist?(tmp_lipoed_binary_path)
|
||||
FileUtils.mv tmp_lipoed_binary_path, device_binary, :force => true
|
||||
|
||||
# collect the swiftmodule file for various archs.
|
||||
device_swiftmodule_path = device_framework_path + "/Modules/#{module_name}.swiftmodule"
|
||||
simulator_swiftmodule_path = simulator_framework_path + "/Modules/#{module_name}.swiftmodule"
|
||||
device_swiftmodule_path = device_framwork_path + "/Modules/#{module_name}.swiftmodule"
|
||||
simulator_swiftmodule_path = simulator_framwork_path + "/Modules/#{module_name}.swiftmodule"
|
||||
if File.exist?(device_swiftmodule_path)
|
||||
FileUtils.cp_r simulator_swiftmodule_path + "/.", device_swiftmodule_path
|
||||
end
|
||||
|
||||
# combine the generated swift headers
|
||||
# (In xcode 10.2, the generated swift headers vary for each archs)
|
||||
# https://github.com/leavez/cocoapods-binary/issues/58
|
||||
simulator_generated_swift_header_path = simulator_framework_path + "/Headers/#{module_name}-Swift.h"
|
||||
device_generated_swift_header_path = device_framework_path + "/Headers/#{module_name}-Swift.h"
|
||||
if File.exist? simulator_generated_swift_header_path
|
||||
device_header = File.read(device_generated_swift_header_path)
|
||||
simulator_header = File.read(simulator_generated_swift_header_path)
|
||||
# https://github.com/Carthage/Carthage/issues/2718#issuecomment-473870461
|
||||
combined_header_content = %Q{
|
||||
#if TARGET_OS_SIMULATOR // merged by cocoapods-binary
|
||||
|
||||
#{simulator_header}
|
||||
|
||||
#else // merged by cocoapods-binary
|
||||
|
||||
#{device_header}
|
||||
|
||||
#endif // merged by cocoapods-binary
|
||||
}
|
||||
File.write(device_generated_swift_header_path, combined_header_content.strip)
|
||||
end
|
||||
|
||||
# handle the dSYM files
|
||||
device_dsym = "#{device_framework_path}.dSYM"
|
||||
device_dsym = "#{device_framwork_path}.dSYM"
|
||||
if File.exist? device_dsym
|
||||
# lipo the simulator dsym
|
||||
simulator_dsym = "#{simulator_framework_path}.dSYM"
|
||||
if File.exist? simulator_dsym
|
||||
tmp_lipoed_binary_path = "#{output_path}/#{module_name}.draft"
|
||||
lipo_log = `lipo -create -output #{tmp_lipoed_binary_path} #{device_dsym}/Contents/Resources/DWARF/#{module_name} #{simulator_dsym}/Contents/Resources/DWARF/#{module_name}`
|
||||
puts lipo_log unless File.exist?(tmp_lipoed_binary_path)
|
||||
FileUtils.mv tmp_lipoed_binary_path, "#{device_framework_path}.dSYM/Contents/Resources/DWARF/#{module_name}", :force => true
|
||||
end
|
||||
# move
|
||||
tmp_lipoed_binary_path = "#{output_path}/#{module_name}.draft"
|
||||
lipo_log = `lipo -create -output #{tmp_lipoed_binary_path} #{device_dsym}/Contents/Resources/DWARF/#{module_name} #{simulator_framwork_path}.dSYM/Contents/Resources/DWARF/#{module_name}`
|
||||
puts lipo_log unless File.exist?(tmp_lipoed_binary_path)
|
||||
FileUtils.mv tmp_lipoed_binary_path, "#{device_framwork_path}.dSYM/Contents/Resources/DWARF/#{module_name}", :force => true
|
||||
FileUtils.mv device_dsym, output_path, :force => true
|
||||
end
|
||||
|
||||
# output
|
||||
output_path.mkpath unless output_path.exist?
|
||||
FileUtils.mv device_framework_path, output_path, :force => true
|
||||
FileUtils.mv device_framwork_path, output_path, :force => true
|
||||
|
||||
end
|
||||
|
||||
@ -110,27 +75,7 @@ def xcodebuild(sandbox, target, sdk='macosx', deployment_target=nil, other_optio
|
||||
platform = PLATFORMS[sdk]
|
||||
args += Fourflusher::SimControl.new.destination(:oldest, platform, deployment_target) unless platform.nil?
|
||||
args += other_options
|
||||
log = `xcodebuild #{args.join(" ")} 2>&1`
|
||||
exit_code = $?.exitstatus # Process::Status
|
||||
is_succeed = (exit_code == 0)
|
||||
|
||||
if !is_succeed
|
||||
begin
|
||||
if log.include?('** BUILD FAILED **')
|
||||
# use xcpretty to print build log
|
||||
# 64 represent command invalid. http://www.manpagez.com/man/3/sysexits/
|
||||
printer = XCPretty::Printer.new({:formatter => XCPretty::Simple, :colorize => 'auto'})
|
||||
log.each_line do |line|
|
||||
printer.pretty_print(line)
|
||||
end
|
||||
else
|
||||
raise "shouldn't be handle by xcpretty"
|
||||
end
|
||||
rescue
|
||||
puts log.red
|
||||
end
|
||||
end
|
||||
[is_succeed, log]
|
||||
Pod::Executable.execute_command 'xcodebuild', args, true
|
||||
end
|
||||
|
||||
|
||||
@ -149,9 +94,9 @@ module Pod
|
||||
# [Pathname] output_path
|
||||
# output path for generated frameworks
|
||||
#
|
||||
def self.build(sandbox_root_path, target, output_path, bitcode_enabled = false, custom_build_options=[], custom_build_options_simulator=[])
|
||||
def self.build(sandbox_root_path, target, output_path, bitcode_enabled = false)
|
||||
|
||||
return if target.nil?
|
||||
return unless not target == nil
|
||||
|
||||
sandbox_root = Pathname(sandbox_root_path)
|
||||
sandbox = Pod::Sandbox.new(sandbox_root)
|
||||
@ -159,10 +104,10 @@ module Pod
|
||||
|
||||
# -- build the framework
|
||||
case target.platform.name
|
||||
when :ios then build_for_iosish_platform(sandbox, build_dir, output_path, target, 'iphoneos', 'iphonesimulator', bitcode_enabled, custom_build_options, custom_build_options_simulator)
|
||||
when :osx then xcodebuild(sandbox, target.label, 'macosx', nil, custom_build_options)
|
||||
when :ios then build_for_iosish_platform(sandbox, build_dir, output_path, target, 'iphoneos', 'iphonesimulator', bitcode_enabled)
|
||||
when :osx then xcodebuild(sandbox, target.label)
|
||||
# when :tvos then build_for_iosish_platform(sandbox, build_dir, target, 'appletvos', 'appletvsimulator')
|
||||
when :watchos then build_for_iosish_platform(sandbox, build_dir, output_path, target, 'watchos', 'watchsimulator', true, custom_build_options, custom_build_options_simulator)
|
||||
# when :watchos then build_for_iosish_platform(sandbox, build_dir, target, 'watchos', 'watchsimulator')
|
||||
else raise "Unsupported platform for '#{target.name}': '#{target.platform.name}'" end
|
||||
|
||||
raise Pod::Informative, 'The build directory was not found in the expected location.' unless build_dir.directory?
|
||||
|
||||
@ -1,19 +0,0 @@
|
||||
class AssertError < StandardError
|
||||
end
|
||||
|
||||
|
||||
def assert(condition, message="")
|
||||
raise AssertError, message unless condition
|
||||
end
|
||||
|
||||
def assert_type(variable, type_class)
|
||||
assert(variable.kind_of?(type_class), "Type is incorrect: #{variable.class} is not #{type_class}")
|
||||
end
|
||||
|
||||
def assert_type_array_of(variable, type_class)
|
||||
assert type_class != nil,'Input type is nil'
|
||||
assert_type variable, Array
|
||||
if variable.first
|
||||
assert_type variable.first, type_class
|
||||
end
|
||||
end
|
||||
@ -1,13 +0,0 @@
|
||||
|
||||
# attr_accessor for class variable.
|
||||
# usage:
|
||||
#
|
||||
# ```
|
||||
# class Pod
|
||||
# class_attr_accessor :is_prebuild_stage
|
||||
# end
|
||||
# ```
|
||||
#
|
||||
def class_attr_accessor(symbol)
|
||||
self.class.send(:attr_accessor, symbol)
|
||||
end
|
||||
@ -1,49 +0,0 @@
|
||||
|
||||
|
||||
# Patch a method
|
||||
# @param [Symbol] method_name
|
||||
# @param [block] content, args: 1 old_method, 2 the array of original args
|
||||
# ```
|
||||
# patch_method :AAA do |old_method, args|
|
||||
# old_method.(*args) # execute the original method
|
||||
# end
|
||||
# ```
|
||||
def patch_method(method_name, &content)
|
||||
return if content.nil?
|
||||
old = instance_method(method_name)
|
||||
raise "Found no method named: #{method_name}" if old.nil?
|
||||
|
||||
define_method(method_name) do |*args|
|
||||
instance_exec old.bind(self), args, &content
|
||||
end
|
||||
end
|
||||
|
||||
# It won't change the return value of the original method
|
||||
# @param [Symbol] method_name
|
||||
# @param [block] content, args: the original args
|
||||
# ```
|
||||
# patch_method_after :AAA do |*args|
|
||||
# # execute the original method
|
||||
# # the added actions
|
||||
# puts "after the original action"
|
||||
# # return the original result
|
||||
# end
|
||||
# ```
|
||||
def patch_method_after(method_name, &content)
|
||||
return if content.nil?
|
||||
patch_method(method_name) do |old_method, args|
|
||||
old_result = old_method.(*args)
|
||||
instance_exec *args, &content
|
||||
next old_result
|
||||
end
|
||||
end
|
||||
|
||||
# @param [Symbol] method_name
|
||||
# @param [block] content, args: the original args
|
||||
def patch_method_before(method_name, &content)
|
||||
return if content.nil?
|
||||
patch_method(method_name) do |old_method, args|
|
||||
instance_exec *args, &content
|
||||
next old_method.(*args)
|
||||
end
|
||||
end
|
||||
@ -1,45 +0,0 @@
|
||||
require_relative 'patch_method'
|
||||
require_relative 'assert'
|
||||
|
||||
# Only execute the patched content when condition is true,
|
||||
# otherwise execute the original method.
|
||||
#
|
||||
# @param [Proc return bool] condition
|
||||
# @see patch_method
|
||||
def patch_method_when(method_name, condition, &content)
|
||||
assert_type condition, Proc
|
||||
patch_method(method_name) do |old_method, args|
|
||||
if condition.call
|
||||
instance_exec old_method, args, &content
|
||||
else
|
||||
old_method.(*args)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# @see patch_method_after
|
||||
def patch_method_after_when(method_name, condition, &content)
|
||||
assert_type condition, Proc
|
||||
patch_method(method_name) do |old_method, args|
|
||||
if condition.call
|
||||
old_result = old_method.(*args)
|
||||
instance_exec *args, &content
|
||||
next old_result
|
||||
else
|
||||
old_method.(*args)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# @see patch_method_before
|
||||
def patch_method_before_when(method_name, condition, &content)
|
||||
assert_type condition, Proc
|
||||
patch_method(method_name) do |old_method, args|
|
||||
if condition.call
|
||||
instance_exec *args, &content
|
||||
old_method.(*args)
|
||||
else
|
||||
old_method.(*args)
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -1,4 +1,12 @@
|
||||
require_relative 'assert'
|
||||
require_relative 'class_attr_accessor'
|
||||
require_relative 'patch_method'
|
||||
require_relative 'patch_method_when'
|
||||
# attr_accessor for class variable.
|
||||
# usage:
|
||||
#
|
||||
# ```
|
||||
# class Pod
|
||||
# class_attr_accessor :is_prebuild_stage
|
||||
# end
|
||||
# ```
|
||||
#
|
||||
def class_attr_accessor(symbol)
|
||||
self.class.send(:attr_accessor, symbol)
|
||||
end
|
||||
@ -1,273 +0,0 @@
|
||||
require 'spec_helper'
|
||||
require 'cocoapods-binary/Prebuild'
|
||||
|
||||
|
||||
|
||||
module Pod
|
||||
describe 'Prebuild' do
|
||||
describe 'Install' do
|
||||
|
||||
before(:each) do
|
||||
# allow(Pod).to receive(:is_prebuild_stage)
|
||||
allow_any_instance_of(Installer).to receive(:prebuild_frameworks!) { }
|
||||
[:download_dependencies, :validate_targets, :generate_pods_project, :perform_post_install_actions].each do |method|
|
||||
allow_any_instance_of(Installer).to receive(method) { }
|
||||
end
|
||||
Prebuild::Context.stub(:in_prebuild_stage).and_return(true)
|
||||
end
|
||||
|
||||
describe 'Pod binarify strategy' do
|
||||
|
||||
context 'when set some pod to binary' do
|
||||
before(:each) do
|
||||
SpecHelper.stub_pod_dependencies(self, { })
|
||||
@installer, @sandbox, @podfile = Pod.build_installer do
|
||||
target 'A' do
|
||||
pod "AFNetworking", :binary => true
|
||||
pod "SnapKit"
|
||||
end
|
||||
end
|
||||
@installer.install!
|
||||
end
|
||||
|
||||
it "should have right pod target" do
|
||||
@installer.pod_targets.map(&:name).should match_array(['AFNetworking'])
|
||||
end
|
||||
it "should have right binary pod" do
|
||||
@installer.prebuild_pod_targets.map(&:name).should match_array(['AFNetworking'])
|
||||
end
|
||||
end
|
||||
|
||||
context 'when explicitly turn off a pod' do
|
||||
before(:each) do
|
||||
SpecHelper.stub_pod_dependencies(self, {
|
||||
RxCocoa: ['RxSwift', '4.4.0'],
|
||||
RxSwift: ['RxAtomic', '4.4.0'],
|
||||
})
|
||||
@installer, @sandbox, @podfile = Pod.build_installer do
|
||||
target 'A' do
|
||||
pod "RxSwift", '4.4.0', :binary => false
|
||||
pod "RxCocoa", '4.4.0', :binary => true
|
||||
pod "SnapKit"
|
||||
end
|
||||
end
|
||||
@installer.install!
|
||||
end
|
||||
|
||||
it "should exclude the off in prebuild target" do
|
||||
@installer.prebuild_pod_targets.map(&:name).should match_array(['RxAtomic', 'RxCocoa'])
|
||||
end
|
||||
|
||||
it "should also have all dependencies in Pod project (for building)" do
|
||||
@installer.pod_targets.map(&:name).should match_array(['RxAtomic', 'RxCocoa', 'RxSwift'])
|
||||
end
|
||||
end
|
||||
|
||||
context 'when binary pod have dependencies' do
|
||||
|
||||
context 'when implicit set dependencies' do
|
||||
before(:each) do
|
||||
SpecHelper.stub_pod_dependencies(self, {
|
||||
RxCocoa: ['RxSwift', '4.4.0'],
|
||||
RxSwift: ['RxAtomic', '4.4.0'],
|
||||
})
|
||||
@installer, @sandbox, @podfile = Pod.build_installer do
|
||||
target 'A' do
|
||||
pod "RxCocoa", '4.4.0', :binary => true
|
||||
pod "SnapKit"
|
||||
end
|
||||
end
|
||||
@installer.install!
|
||||
end
|
||||
|
||||
it "should have include all dependencies" do
|
||||
[@installer.prebuild_pod_targets, @installer.pod_targets].each do |targets|
|
||||
targets.map(&:name).should match_array(['RxAtomic', 'RxCocoa', 'RxSwift'])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when explicitly set version for dependencies and make it non-binary' do
|
||||
before(:each) do
|
||||
SpecHelper.stub_pod_dependencies(self, {
|
||||
RxCocoa: ['RxSwift', '4.4.0'],
|
||||
RxSwift: ['RxAtomic', '4.4.0'],
|
||||
})
|
||||
@installer, @sandbox, @podfile = Pod.build_installer do
|
||||
target 'A' do
|
||||
pod "RxCocoa", '4.4.0', :binary => true
|
||||
pod "RxSwift", '4.5.0', :binary => false
|
||||
pod "SnapKit"
|
||||
end
|
||||
end
|
||||
@installer.install!
|
||||
end
|
||||
|
||||
it "should exclude the explicit off" do
|
||||
@installer.prebuild_pod_targets.map(&:name).should match_array(['RxAtomic', 'RxCocoa'])
|
||||
end
|
||||
|
||||
#TODO
|
||||
xit "should have the right version for the explicit off" do
|
||||
rxswift = @installer.pod_targets.find{ |t|t.pod_name == 'RxSwift'}
|
||||
rxswift.should_not be_nil
|
||||
spec = @installer.analysis_result.specifications.find{ |s|s.name == 'RxSwift'}
|
||||
spec.version.to_s.should == '4.5.0'
|
||||
end
|
||||
|
||||
it "should have all the dependencies to build in Pod project" do
|
||||
@installer.pod_targets.map(&:name).should match_array(['RxAtomic', 'RxCocoa', 'RxSwift'])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "When use multiple platforms" do
|
||||
before(:each) do
|
||||
SpecHelper.stub_pod_dependencies(self, { })
|
||||
@installer, @sandbox, @podfile = Pod.build_installer do
|
||||
target 'A' do
|
||||
platform :ios
|
||||
pod "AFNetworking", :binary => true
|
||||
end
|
||||
target 'B' do
|
||||
platform :watchos
|
||||
pod "AFNetworking", :binary => false
|
||||
end
|
||||
end
|
||||
@installer.install!
|
||||
end
|
||||
|
||||
it "should have targets named with (pod_name + platform) " do
|
||||
@installer.prebuild_pod_targets.map(&:name).should match_array(["AFNetworking-iOS", "AFNetworking-watchOS"])
|
||||
end
|
||||
it "for one pod, targets on different platforms should all be binary if one platform is binary" do
|
||||
@installer.prebuild_pod_targets.map(&:pod_name).should match_array(["AFNetworking", "AFNetworking"])
|
||||
end
|
||||
end
|
||||
|
||||
context "When use subspecs" do
|
||||
context 'when subspecs have different binary state' do
|
||||
before(:each) do
|
||||
SpecHelper.stub_pod_dependencies(self, { })
|
||||
@installer, @sandbox, @podfile = Pod.build_installer do
|
||||
target 'A' do
|
||||
pod "AFNetworking/Reachability", :binary => true
|
||||
pod "AFNetworking/Security", :binary => false
|
||||
pod "SnapKit"
|
||||
end
|
||||
end
|
||||
@installer.install!
|
||||
end
|
||||
|
||||
it "should have target named with pod name " do
|
||||
@installer.pod_targets.map(&:name).should match_array(['AFNetworking'])
|
||||
end
|
||||
it "should have all used subspec content (even a subspec is set to off explicitly)" do
|
||||
target = @installer.pod_targets.first
|
||||
target.specs.map(&:name).should match_array ['AFNetworking/Reachability', 'AFNetworking/Security']
|
||||
end
|
||||
end
|
||||
|
||||
context 'when use subspec in different targets' do
|
||||
before(:each) do
|
||||
SpecHelper.stub_pod_dependencies(self, { })
|
||||
@installer, @sandbox, @podfile = Pod.build_installer do
|
||||
target 'A' do
|
||||
pod "AFNetworking/Security", :binary => true
|
||||
end
|
||||
target 'B' do
|
||||
pod "AFNetworking/Security", :binary => false # or true
|
||||
end
|
||||
end
|
||||
@installer.install!
|
||||
end
|
||||
|
||||
#TODO !!!!
|
||||
xit "the binary target's name should equal to root pod name " do
|
||||
@installer.prebuild_pod_targets.map(&:name).should match_array(['AFNetworking'])
|
||||
end
|
||||
xit "should have just enough subspec content" do
|
||||
target = @installer.prebuild_pod_targets.first
|
||||
target.specs.map(&:name).should match_array ['AFNetworking/Security']
|
||||
end
|
||||
end
|
||||
|
||||
context 'when use different subspecs in different targets' do
|
||||
before(:each) do
|
||||
SpecHelper.stub_pod_dependencies(self, { })
|
||||
@installer, @sandbox, @podfile = Pod.build_installer do
|
||||
target 'A' do
|
||||
pod "AFNetworking/Reachability", :binary => true
|
||||
end
|
||||
target 'B' do
|
||||
pod "AFNetworking/Security", :binary => false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#TODO
|
||||
xit "should not be supported" do
|
||||
# ["AFNetworking-Reachability", "AFNetworking-Security"]
|
||||
expect {
|
||||
@installer.install!
|
||||
}.to raise_error
|
||||
end
|
||||
end
|
||||
|
||||
context 'when subspecs have dependency' do
|
||||
before(:each) do
|
||||
SpecHelper.stub_pod_dependencies(self, {
|
||||
'AFNetworking/Security'.to_sym => ['Masonry', '1.1.0']
|
||||
})
|
||||
@installer, @sandbox, @podfile = Pod.build_installer do
|
||||
target 'A' do
|
||||
pod "AFNetworking/Security", :binary => true
|
||||
end
|
||||
end
|
||||
@installer.install!
|
||||
end
|
||||
|
||||
it "should have just enough content" do
|
||||
target = @installer.prebuild_pod_targets.first
|
||||
target.specs.map(&:name).should match_array ['AFNetworking/Security']
|
||||
@installer.prebuild_pod_targets.map(&:name).should match_array(['AFNetworking', 'Masonry'])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "when have local pod" do
|
||||
before(:each) do
|
||||
SpecHelper.stub_pod_dependencies(self, { })
|
||||
allow_any_instance_of(Specification).to receive(:local?) { |s|
|
||||
next true if s.name == 'AFNetworking' or s.name == 'SnapKit'
|
||||
false
|
||||
}
|
||||
@installer, @sandbox, @podfile = Pod.build_installer do
|
||||
target 'A' do
|
||||
pod "AFNetworking/Security", :binary => true # mock it to local
|
||||
pod "SnapKit", :binary => true # mock it to local
|
||||
pod "Literal", :binary => true
|
||||
end
|
||||
end
|
||||
@installer.install!
|
||||
end
|
||||
|
||||
it "local pod should be exclude" do
|
||||
@installer.prebuild_pod_targets.map(&:name).should match_array(['Literal'])
|
||||
end
|
||||
|
||||
it "local pod should still in project" do
|
||||
@installer.pod_targets.map(&:name).should match_array(['AFNetworking', 'Literal', 'SnapKit'])
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
@ -1,15 +1,18 @@
|
||||
require 'pathname'
|
||||
ROOT = Pathname.new(File.expand_path('../../', __FILE__))
|
||||
$:.unshift((ROOT + 'lib').to_s)
|
||||
$:.unshift((ROOT + 'spec').to_s)
|
||||
|
||||
require 'bundler/setup'
|
||||
require 'bacon'
|
||||
require 'mocha-on-bacon'
|
||||
require 'pretty_bacon'
|
||||
require 'pathname'
|
||||
require 'cocoapods'
|
||||
require 'cocoapods_plugin'
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.expect_with :rspec do |c|
|
||||
c.syntax = [:should, :expect]
|
||||
end
|
||||
config.mock_with :rspec do |mocks|
|
||||
mocks.syntax = [:expect, :should]
|
||||
end
|
||||
end
|
||||
Mocha::Configuration.prevent(:stubbing_non_existent_method)
|
||||
|
||||
require 'cocoapods_plugin'
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
@ -45,53 +48,3 @@ module Pod
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
module Pod
|
||||
|
||||
def self.build_installer(&podfile_text)
|
||||
# Config.instance.silent = true
|
||||
sandbox = Sandbox.new(Dir.tmpdir + "/binary_spec_#{Time.new.to_i}")
|
||||
podfile = Podfile.new do
|
||||
platform :ios, '12.0'
|
||||
instance_eval &podfile_text
|
||||
end
|
||||
installer = Installer.new(sandbox, podfile)
|
||||
installer.installation_options.integrate_targets = false
|
||||
[installer, sandbox, podfile]
|
||||
end
|
||||
|
||||
module SpecHelper
|
||||
|
||||
# mock the dependency of pods, as the dependency may changed along pod version
|
||||
# @param [Hash<Symbol, Array<Arrary<String>>>] modification
|
||||
def self.stub_pod_dependencies(context, modification)
|
||||
raise if modification.nil?
|
||||
if !@specification_hooked
|
||||
Specification.class_eval do
|
||||
alias_method :original_dependencies, :dependencies
|
||||
end
|
||||
@specification_hooked = true
|
||||
end
|
||||
|
||||
context.allow_any_instance_of(Specification).to context.receive(:dependencies) { |s|
|
||||
deps = modification[s.name.to_sym]
|
||||
if deps
|
||||
if deps == []
|
||||
next []
|
||||
end
|
||||
if deps.first.kind_of? String
|
||||
deps = [deps]
|
||||
end
|
||||
next deps.map{ |name_and_version| Dependency.new(name_and_version[0].to_s, name_and_version[1]) }
|
||||
end
|
||||
if modification[:keep_untouched]
|
||||
next s.original_dependencies
|
||||
else
|
||||
[]
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -1,287 +0,0 @@
|
||||
require 'rspec'
|
||||
require 'cocoapods-binary/tool/patch_method'
|
||||
|
||||
|
||||
|
||||
describe 'Patch method' do
|
||||
|
||||
it 'should patch the content' do
|
||||
module SpecPatchMethod
|
||||
class A
|
||||
def m
|
||||
"1"
|
||||
end
|
||||
|
||||
patch_method('m') do |old_method, args|
|
||||
"2"
|
||||
end
|
||||
end
|
||||
|
||||
ins = A.new
|
||||
ins.m().should == '2'
|
||||
end
|
||||
end
|
||||
|
||||
it 'should keep the args' do
|
||||
module SpecPatchMethod
|
||||
class B
|
||||
def m(a, b)
|
||||
"1#{a}#{b}"
|
||||
end
|
||||
|
||||
patch_method('m') do |old_method, args|
|
||||
"2#{args[0]}#{args[1]}"
|
||||
end
|
||||
end
|
||||
|
||||
ins = B.new
|
||||
ins.m(1,2).should == '212'
|
||||
end
|
||||
end
|
||||
|
||||
it "should have right scope" do
|
||||
module SpecPatchMethod
|
||||
class C
|
||||
def m
|
||||
end
|
||||
|
||||
def who_am_i
|
||||
self.class.name
|
||||
end
|
||||
|
||||
patch_method('m') do |old_method, args|
|
||||
who_am_i
|
||||
end
|
||||
end
|
||||
|
||||
C.new.m.should == 'SpecPatchMethod::C'
|
||||
end
|
||||
end
|
||||
|
||||
it "the original method is can be accessed" do
|
||||
module SpecPatchMethod
|
||||
class D
|
||||
def m(a)
|
||||
"1#{a}"
|
||||
end
|
||||
|
||||
patch_method('m') do |old_method, args|
|
||||
old_method.(*args)
|
||||
end
|
||||
end
|
||||
|
||||
D.new.m(2).should == '12'
|
||||
end
|
||||
end
|
||||
|
||||
it "can call multiple times" do
|
||||
module SpecPatchMethod
|
||||
class E
|
||||
def m(a)
|
||||
"0#{a}"
|
||||
end
|
||||
|
||||
patch_method('m') do |old_method, args|
|
||||
old_method.(*args) + "2"
|
||||
end
|
||||
patch_method('m') do |old_method, args|
|
||||
old_method.(*args) + "3"
|
||||
end
|
||||
end
|
||||
|
||||
E.new.m(1).should == '0123'
|
||||
end
|
||||
end
|
||||
|
||||
it "can keep original default value" do
|
||||
module SpecPatchMethod
|
||||
class F
|
||||
def m(a='D')
|
||||
"0#{a}"
|
||||
end
|
||||
|
||||
patch_method('m') do |old_method, args|
|
||||
old_method.(*args) + "2"
|
||||
end
|
||||
patch_method('m') do |old_method, args|
|
||||
old_method.(*args) + "3"
|
||||
end
|
||||
end
|
||||
|
||||
F.new.m().should == '0D23'
|
||||
F.new.m(1).should == '0123'
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
describe 'Patch method before' do
|
||||
|
||||
it 'should patch the content' do
|
||||
module SpecPatchMethodBefore
|
||||
class A
|
||||
attr_accessor :output
|
||||
def m
|
||||
output << 1
|
||||
end
|
||||
|
||||
patch_method_before('m') do |*args|
|
||||
self.output = [2]
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
a = A.new
|
||||
a.m().should == [2, 1]
|
||||
end
|
||||
end
|
||||
|
||||
it 'should keep the args' do
|
||||
module SpecPatchMethodBefore
|
||||
class B
|
||||
attr_accessor :output
|
||||
def m(a,b)
|
||||
self.output ||= []
|
||||
output << a
|
||||
output << b
|
||||
end
|
||||
|
||||
patch_method_before('m') do |*args|
|
||||
self.output ||= []
|
||||
self.output += args
|
||||
end
|
||||
end
|
||||
a = B.new
|
||||
a.m(1,2)
|
||||
a.output.should == [1,2,1,2]
|
||||
end
|
||||
end
|
||||
|
||||
it "should have right scope" do
|
||||
module SpecPatchMethodBefore
|
||||
class C
|
||||
attr_accessor :output
|
||||
def m
|
||||
end
|
||||
|
||||
def do_it
|
||||
self.output = 1
|
||||
end
|
||||
|
||||
patch_method_before('m') do
|
||||
do_it
|
||||
end
|
||||
end
|
||||
|
||||
a = C.new
|
||||
a.m
|
||||
a.output.should == 1
|
||||
end
|
||||
end
|
||||
|
||||
it "won't affect the original result" do
|
||||
module SpecPatchMethodBefore
|
||||
class D
|
||||
def m(a)
|
||||
"1#{a}"
|
||||
end
|
||||
|
||||
patch_method_before('m') do |*args|
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
D.new.m(2).should == '12'
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
describe 'Patch method after' do
|
||||
|
||||
it 'should patch the content' do
|
||||
module SpecPatchMethodAfter
|
||||
class A
|
||||
attr_accessor :output
|
||||
def m
|
||||
self.output = [2]
|
||||
end
|
||||
|
||||
patch_method_after('m') do |*args|
|
||||
output << 1
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
a = A.new
|
||||
a.m().should == [2, 1]
|
||||
end
|
||||
end
|
||||
|
||||
it 'should keep the args' do
|
||||
module SpecPatchMethodAfter
|
||||
class B
|
||||
attr_accessor :output
|
||||
def m(a,b)
|
||||
self.output ||= []
|
||||
output << a
|
||||
output << b
|
||||
end
|
||||
|
||||
patch_method_after('m') do |*args|
|
||||
self.output ||= []
|
||||
self.output += args
|
||||
end
|
||||
end
|
||||
|
||||
a = B.new
|
||||
a.m(1,2)
|
||||
a.output.should == [1,2,1,2]
|
||||
end
|
||||
end
|
||||
|
||||
it "should have right scope" do
|
||||
module SpecPatchMethodAfter
|
||||
class C
|
||||
attr_accessor :output
|
||||
def m
|
||||
end
|
||||
|
||||
def do_it
|
||||
self.output = 1
|
||||
end
|
||||
|
||||
patch_method_after('m') do
|
||||
do_it
|
||||
end
|
||||
end
|
||||
|
||||
a = C.new
|
||||
a.m
|
||||
a.output.should == 1
|
||||
end
|
||||
end
|
||||
|
||||
it "won't affect the original result" do
|
||||
module SpecPatchMethodAfter
|
||||
class D
|
||||
def m(a)
|
||||
"1#{a}"
|
||||
end
|
||||
|
||||
patch_method_after('m') do |*args|
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
D.new.m(2).should == '12'
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
@ -1,105 +0,0 @@
|
||||
require 'rspec'
|
||||
require 'cocoapods-binary/tool/patch_method_when'
|
||||
|
||||
describe 'Patch method when' do
|
||||
|
||||
it 'should patch the content' do
|
||||
module SpecPatchMethodWhen
|
||||
class A
|
||||
def m
|
||||
"1"
|
||||
end
|
||||
|
||||
patch_method_when('m', Proc.new{ true }) do |old_method, args|
|
||||
"2"
|
||||
end
|
||||
end
|
||||
|
||||
ins = A.new
|
||||
ins.m().should == '2'
|
||||
end
|
||||
end
|
||||
|
||||
it "the condition switch should be valid " do
|
||||
module SpecPatchMethodWhen
|
||||
class Switch
|
||||
class << self
|
||||
attr_accessor :on
|
||||
end
|
||||
end
|
||||
class G
|
||||
def m
|
||||
"1"
|
||||
end
|
||||
|
||||
patch_method_when('m', Proc.new{ Switch.on }) do |old_method, args|
|
||||
"2"
|
||||
end
|
||||
end
|
||||
|
||||
ins = G.new
|
||||
Switch.on = true
|
||||
ins.m().should == '2'
|
||||
Switch.on = false
|
||||
ins.m().should == '1'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
it 'should keep the args' do
|
||||
module SpecPatchMethodWhen
|
||||
class B
|
||||
def m(a, b)
|
||||
"1#{a}#{b}"
|
||||
end
|
||||
|
||||
patch_method_when('m', Proc.new{ true }) do |old_method, args|
|
||||
"2#{args[0]}#{args[1]}"
|
||||
end
|
||||
end
|
||||
|
||||
ins = B.new
|
||||
ins.m(1,2).should == '212'
|
||||
end
|
||||
end
|
||||
|
||||
it "should have right scope" do
|
||||
module SpecPatchMethodWhen
|
||||
class C
|
||||
def m
|
||||
end
|
||||
|
||||
def who_am_i
|
||||
self.class.name
|
||||
end
|
||||
|
||||
patch_method_when('m', Proc.new{ true }) do |old_method, args|
|
||||
who_am_i
|
||||
end
|
||||
end
|
||||
|
||||
C.new.m.should == 'SpecPatchMethodWhen::C'
|
||||
end
|
||||
end
|
||||
|
||||
it "the original method is can be accessed" do
|
||||
module SpecPatchMethodWhen
|
||||
class D
|
||||
def m(a)
|
||||
"1#{a}"
|
||||
end
|
||||
|
||||
patch_method_when('m', Proc.new{ true }) do |old_method, args|
|
||||
old_method.(*args)
|
||||
end
|
||||
end
|
||||
|
||||
D.new.m(2).should == '12'
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
require 'rspec'
|
||||
|
||||
|
||||
@ -10,59 +10,9 @@
|
||||
3E1E218020A0B66900EFA102 /* import.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E1E217F20A0B66900EFA102 /* import.swift */; };
|
||||
3E83E326207BC00E0057855A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E83E325207BC00E0057855A /* AppDelegate.swift */; };
|
||||
3E83E328207BC00E0057855A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E83E327207BC00E0057855A /* ViewController.swift */; };
|
||||
3EEAFD8720F1056D009A9D22 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3EEAFD8520F1056D009A9D22 /* Interface.storyboard */; };
|
||||
3EEAFD8920F1056D009A9D22 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3EEAFD8820F1056D009A9D22 /* Assets.xcassets */; };
|
||||
3EEAFD9020F1056E009A9D22 /* BinaryWatch Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 3EEAFD8F20F1056E009A9D22 /* BinaryWatch Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
3EEAFD9520F1056E009A9D22 /* InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EEAFD9420F1056E009A9D22 /* InterfaceController.swift */; };
|
||||
3EEAFD9720F1056E009A9D22 /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EEAFD9620F1056E009A9D22 /* ExtensionDelegate.swift */; };
|
||||
3EEAFD9920F1056E009A9D22 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3EEAFD9820F1056E009A9D22 /* Assets.xcassets */; };
|
||||
3EEAFD9D20F1056E009A9D22 /* BinaryWatch.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 3EEAFD8320F1056D009A9D22 /* BinaryWatch.app */; };
|
||||
3EEAFDA720F10610009A9D22 /* import.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EEAFDA620F10610009A9D22 /* import.swift */; };
|
||||
AEBC61E3160A9AC38C3A210D /* Pods_Binary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5687B1A81F152DBEF5CD4432 /* Pods_Binary.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
3EEAFD9120F1056E009A9D22 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 3E83E31A207BC00E0057855A /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 3EEAFD8E20F1056E009A9D22;
|
||||
remoteInfo = "BinaryWatch Extension";
|
||||
};
|
||||
3EEAFD9B20F1056E009A9D22 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 3E83E31A207BC00E0057855A /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 3EEAFD8220F1056D009A9D22;
|
||||
remoteInfo = BinaryWatch;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
3EEAFDA320F1056E009A9D22 /* Embed App Extensions */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 13;
|
||||
files = (
|
||||
3EEAFD9020F1056E009A9D22 /* BinaryWatch Extension.appex in Embed App Extensions */,
|
||||
);
|
||||
name = "Embed App Extensions";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3EEAFDA520F1056E009A9D22 /* Embed Watch Content */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "$(CONTENTS_FOLDER_PATH)/Watch";
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
3EEAFD9D20F1056E009A9D22 /* BinaryWatch.app in Embed Watch Content */,
|
||||
);
|
||||
name = "Embed Watch Content";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1856F5E2BE44EDB1E470521A /* Pods-Binary.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Binary.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Binary/Pods-Binary.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
3E1E217F20A0B66900EFA102 /* import.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = import.swift; sourceTree = "<group>"; };
|
||||
@ -70,16 +20,6 @@
|
||||
3E83E325207BC00E0057855A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
3E83E327207BC00E0057855A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
||||
3E83E331207BC0120057855A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
3EEAFD8320F1056D009A9D22 /* BinaryWatch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BinaryWatch.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3EEAFD8620F1056D009A9D22 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = "<group>"; };
|
||||
3EEAFD8820F1056D009A9D22 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
3EEAFD8A20F1056E009A9D22 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
3EEAFD8F20F1056E009A9D22 /* BinaryWatch Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "BinaryWatch Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3EEAFD9420F1056E009A9D22 /* InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterfaceController.swift; sourceTree = "<group>"; };
|
||||
3EEAFD9620F1056E009A9D22 /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = "<group>"; };
|
||||
3EEAFD9820F1056E009A9D22 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
3EEAFD9A20F1056E009A9D22 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
3EEAFDA620F10610009A9D22 /* import.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = import.swift; sourceTree = "<group>"; };
|
||||
5687B1A81F152DBEF5CD4432 /* Pods_Binary.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Binary.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
7EB848DBE64BD495BCC04ECC /* Pods-Binary.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Binary.release.xcconfig"; path = "Pods/Target Support Files/Pods-Binary/Pods-Binary.release.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
@ -93,13 +33,6 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3EEAFD8C20F1056E009A9D22 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
@ -107,8 +40,6 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3E83E324207BC00E0057855A /* Binary */,
|
||||
3EEAFD8420F1056D009A9D22 /* BinaryWatch */,
|
||||
3EEAFD9320F1056E009A9D22 /* BinaryWatch Extension */,
|
||||
3E83E323207BC00E0057855A /* Products */,
|
||||
E8117D681BF19C1B3D847824 /* Pods */,
|
||||
8E13F0A6AED19C681C2CD7D5 /* Frameworks */,
|
||||
@ -119,8 +50,6 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3E83E322207BC00E0057855A /* Binary.app */,
|
||||
3EEAFD8320F1056D009A9D22 /* BinaryWatch.app */,
|
||||
3EEAFD8F20F1056E009A9D22 /* BinaryWatch Extension.appex */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@ -136,28 +65,6 @@
|
||||
path = Binary;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3EEAFD8420F1056D009A9D22 /* BinaryWatch */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3EEAFD8520F1056D009A9D22 /* Interface.storyboard */,
|
||||
3EEAFD8820F1056D009A9D22 /* Assets.xcassets */,
|
||||
3EEAFD8A20F1056E009A9D22 /* Info.plist */,
|
||||
);
|
||||
path = BinaryWatch;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3EEAFD9320F1056E009A9D22 /* BinaryWatch Extension */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3EEAFD9420F1056E009A9D22 /* InterfaceController.swift */,
|
||||
3EEAFD9620F1056E009A9D22 /* ExtensionDelegate.swift */,
|
||||
3EEAFDA620F10610009A9D22 /* import.swift */,
|
||||
3EEAFD9820F1056E009A9D22 /* Assets.xcassets */,
|
||||
3EEAFD9A20F1056E009A9D22 /* Info.plist */,
|
||||
);
|
||||
path = "BinaryWatch Extension";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8E13F0A6AED19C681C2CD7D5 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -187,71 +94,29 @@
|
||||
3E83E31F207BC00E0057855A /* Frameworks */,
|
||||
3E83E320207BC00E0057855A /* Resources */,
|
||||
9937F6A880D56826534273F0 /* [CP] Embed Pods Frameworks */,
|
||||
3EEAFDA520F1056E009A9D22 /* Embed Watch Content */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
3EEAFD9C20F1056E009A9D22 /* PBXTargetDependency */,
|
||||
);
|
||||
name = Binary;
|
||||
productName = Binary;
|
||||
productReference = 3E83E322207BC00E0057855A /* Binary.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
3EEAFD8220F1056D009A9D22 /* BinaryWatch */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3EEAFDA420F1056E009A9D22 /* Build configuration list for PBXNativeTarget "BinaryWatch" */;
|
||||
buildPhases = (
|
||||
3EEAFD8120F1056D009A9D22 /* Resources */,
|
||||
3EEAFDA320F1056E009A9D22 /* Embed App Extensions */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
3EEAFD9220F1056E009A9D22 /* PBXTargetDependency */,
|
||||
);
|
||||
name = BinaryWatch;
|
||||
productName = BinaryWatch;
|
||||
productReference = 3EEAFD8320F1056D009A9D22 /* BinaryWatch.app */;
|
||||
productType = "com.apple.product-type.application.watchapp2";
|
||||
};
|
||||
3EEAFD8E20F1056E009A9D22 /* BinaryWatch Extension */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3EEAFDA220F1056E009A9D22 /* Build configuration list for PBXNativeTarget "BinaryWatch Extension" */;
|
||||
buildPhases = (
|
||||
3EEAFD8B20F1056E009A9D22 /* Sources */,
|
||||
3EEAFD8C20F1056E009A9D22 /* Frameworks */,
|
||||
3EEAFD8D20F1056E009A9D22 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "BinaryWatch Extension";
|
||||
productName = "BinaryWatch Extension";
|
||||
productReference = 3EEAFD8F20F1056E009A9D22 /* BinaryWatch Extension.appex */;
|
||||
productType = "com.apple.product-type.watchkit2-extension";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
3E83E31A207BC00E0057855A /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 1000;
|
||||
LastSwiftUpdateCheck = 0930;
|
||||
LastUpgradeCheck = 0930;
|
||||
ORGANIZATIONNAME = me.leavez;
|
||||
TargetAttributes = {
|
||||
3E83E321207BC00E0057855A = {
|
||||
CreatedOnToolsVersion = 9.3;
|
||||
};
|
||||
3EEAFD8220F1056D009A9D22 = {
|
||||
CreatedOnToolsVersion = 10.0;
|
||||
};
|
||||
3EEAFD8E20F1056E009A9D22 = {
|
||||
CreatedOnToolsVersion = 10.0;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 3E83E31D207BC00E0057855A /* Build configuration list for PBXProject "Binary" */;
|
||||
@ -268,8 +133,6 @@
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
3E83E321207BC00E0057855A /* Binary */,
|
||||
3EEAFD8220F1056D009A9D22 /* BinaryWatch */,
|
||||
3EEAFD8E20F1056E009A9D22 /* BinaryWatch Extension */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@ -282,23 +145,6 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3EEAFD8120F1056D009A9D22 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3EEAFD8920F1056D009A9D22 /* Assets.xcassets in Resources */,
|
||||
3EEAFD8720F1056D009A9D22 /* Interface.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3EEAFD8D20F1056E009A9D22 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3EEAFD9920F1056E009A9D22 /* Assets.xcassets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
@ -353,42 +199,8 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3EEAFD8B20F1056E009A9D22 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3EEAFD9720F1056E009A9D22 /* ExtensionDelegate.swift in Sources */,
|
||||
3EEAFDA720F10610009A9D22 /* import.swift in Sources */,
|
||||
3EEAFD9520F1056E009A9D22 /* InterfaceController.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
3EEAFD9220F1056E009A9D22 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 3EEAFD8E20F1056E009A9D22 /* BinaryWatch Extension */;
|
||||
targetProxy = 3EEAFD9120F1056E009A9D22 /* PBXContainerItemProxy */;
|
||||
};
|
||||
3EEAFD9C20F1056E009A9D22 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 3EEAFD8220F1056D009A9D22 /* BinaryWatch */;
|
||||
targetProxy = 3EEAFD9B20F1056E009A9D22 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
3EEAFD8520F1056D009A9D22 /* Interface.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
3EEAFD8620F1056D009A9D22 /* Base */,
|
||||
);
|
||||
name = Interface.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
3E83E332207BC0120057855A /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
@ -510,10 +322,7 @@
|
||||
buildSettings = {
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
INFOPLIST_FILE = Binary/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = me.leavez.Binary;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
@ -527,10 +336,7 @@
|
||||
buildSettings = {
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
INFOPLIST_FILE = Binary/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = me.leavez.Binary;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
@ -538,86 +344,6 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
3EEAFD9E20F1056E009A9D22 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
IBSC_MODULE = BinaryWatch_Extension;
|
||||
INFOPLIST_FILE = BinaryWatch/Info.plist;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = me.leavez.Binary.watchkitapp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = watchos;
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = 4;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3EEAFD9F20F1056E009A9D22 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
IBSC_MODULE = BinaryWatch_Extension;
|
||||
INFOPLIST_FILE = BinaryWatch/Info.plist;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = me.leavez.Binary.watchkitapp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = watchos;
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = 4;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
3EEAFDA020F1056E009A9D22 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
INFOPLIST_FILE = "BinaryWatch Extension/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = me.leavez.Binary.watchkitapp.watchkitextension;
|
||||
PRODUCT_NAME = "${TARGET_NAME}";
|
||||
SDKROOT = watchos;
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = 4;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3EEAFDA120F1056E009A9D22 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
INFOPLIST_FILE = "BinaryWatch Extension/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = me.leavez.Binary.watchkitapp.watchkitextension;
|
||||
PRODUCT_NAME = "${TARGET_NAME}";
|
||||
SDKROOT = watchos;
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = 4;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
@ -639,24 +365,6 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
3EEAFDA220F1056E009A9D22 /* Build configuration list for PBXNativeTarget "BinaryWatch Extension" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3EEAFDA020F1056E009A9D22 /* Debug */,
|
||||
3EEAFDA120F1056E009A9D22 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
3EEAFDA420F1056E009A9D22 /* Build configuration list for PBXNativeTarget "BinaryWatch" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3EEAFD9E20F1056E009A9D22 /* Debug */,
|
||||
3EEAFD9F20F1056E009A9D22 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 3E83E31A207BC00E0057855A /* Project object */;
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "watch",
|
||||
"scale" : "2x",
|
||||
"screen-width" : "<=145"
|
||||
},
|
||||
{
|
||||
"idiom" : "watch",
|
||||
"scale" : "2x",
|
||||
"screen-width" : ">145"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
{
|
||||
"assets" : [
|
||||
{
|
||||
"idiom" : "watch",
|
||||
"filename" : "Circular.imageset",
|
||||
"role" : "circular"
|
||||
},
|
||||
{
|
||||
"idiom" : "watch",
|
||||
"filename" : "Extra Large.imageset",
|
||||
"role" : "extra-large"
|
||||
},
|
||||
{
|
||||
"idiom" : "watch",
|
||||
"filename" : "Modular.imageset",
|
||||
"role" : "modular"
|
||||
},
|
||||
{
|
||||
"idiom" : "watch",
|
||||
"filename" : "Utilitarian.imageset",
|
||||
"role" : "utilitarian"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "watch",
|
||||
"scale" : "2x",
|
||||
"screen-width" : "<=145"
|
||||
},
|
||||
{
|
||||
"idiom" : "watch",
|
||||
"scale" : "2x",
|
||||
"screen-width" : ">145"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "watch",
|
||||
"scale" : "2x",
|
||||
"screen-width" : "<=145"
|
||||
},
|
||||
{
|
||||
"idiom" : "watch",
|
||||
"scale" : "2x",
|
||||
"screen-width" : ">145"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "watch",
|
||||
"scale" : "2x",
|
||||
"screen-width" : "<=145"
|
||||
},
|
||||
{
|
||||
"idiom" : "watch",
|
||||
"scale" : "2x",
|
||||
"screen-width" : ">145"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
//
|
||||
// ExtensionDelegate.swift
|
||||
// BinaryWatch Extension
|
||||
//
|
||||
// Created by Gao on 2018/7/7.
|
||||
// Copyright © 2018 me.leavez. All rights reserved.
|
||||
//
|
||||
|
||||
import WatchKit
|
||||
|
||||
class ExtensionDelegate: NSObject, WKExtensionDelegate {
|
||||
|
||||
func applicationDidFinishLaunching() {
|
||||
// Perform any final initialization of your application.
|
||||
}
|
||||
|
||||
func applicationDidBecomeActive() {
|
||||
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,36 +0,0 @@
|
||||
<?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>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>BinaryWatch Extension</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XPC!</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>NSExtension</key>
|
||||
<dict>
|
||||
<key>NSExtensionAttributes</key>
|
||||
<dict>
|
||||
<key>WKAppBundleIdentifier</key>
|
||||
<string>me.leavez.Binary.watchkitapp</string>
|
||||
</dict>
|
||||
<key>NSExtensionPointIdentifier</key>
|
||||
<string>com.apple.watchkit</string>
|
||||
</dict>
|
||||
<key>WKExtensionDelegateClassName</key>
|
||||
<string>$(PRODUCT_MODULE_NAME).ExtensionDelegate</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -1,31 +0,0 @@
|
||||
//
|
||||
// InterfaceController.swift
|
||||
// BinaryWatch Extension
|
||||
//
|
||||
// Created by Gao on 2018/7/7.
|
||||
// Copyright © 2018 me.leavez. All rights reserved.
|
||||
//
|
||||
|
||||
import WatchKit
|
||||
import Foundation
|
||||
|
||||
|
||||
class InterfaceController: WKInterfaceController {
|
||||
|
||||
override func awake(withContext context: Any?) {
|
||||
super.awake(withContext: context)
|
||||
|
||||
// Configure interface objects here.
|
||||
}
|
||||
|
||||
override func willActivate() {
|
||||
// This method is called when watch view controller is about to be visible to user
|
||||
super.willActivate()
|
||||
}
|
||||
|
||||
override func didDeactivate() {
|
||||
// This method is called when watch view controller is no longer visible
|
||||
super.didDeactivate()
|
||||
}
|
||||
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
|
||||
@ -1,67 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "24x24",
|
||||
"idiom" : "watch",
|
||||
"scale" : "2x",
|
||||
"role" : "notificationCenter",
|
||||
"subtype" : "38mm"
|
||||
},
|
||||
{
|
||||
"size" : "27.5x27.5",
|
||||
"idiom" : "watch",
|
||||
"scale" : "2x",
|
||||
"role" : "notificationCenter",
|
||||
"subtype" : "42mm"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "watch",
|
||||
"role" : "companionSettings",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "watch",
|
||||
"role" : "companionSettings",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "watch",
|
||||
"scale" : "2x",
|
||||
"role" : "appLauncher",
|
||||
"subtype" : "38mm"
|
||||
},
|
||||
{
|
||||
"size" : "44x44",
|
||||
"idiom" : "watch",
|
||||
"scale" : "2x",
|
||||
"role" : "longLook",
|
||||
"subtype" : "42mm"
|
||||
},
|
||||
{
|
||||
"size" : "86x86",
|
||||
"idiom" : "watch",
|
||||
"scale" : "2x",
|
||||
"role" : "quickLook",
|
||||
"subtype" : "38mm"
|
||||
},
|
||||
{
|
||||
"size" : "98x98",
|
||||
"idiom" : "watch",
|
||||
"scale" : "2x",
|
||||
"role" : "quickLook",
|
||||
"subtype" : "42mm"
|
||||
},
|
||||
{
|
||||
"idiom" : "watch-marketing",
|
||||
"size" : "1024x1024",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="11134" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="AgC-eL-Hgc">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="11055"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Interface Controller-->
|
||||
<scene sceneID="aou-V4-d1y">
|
||||
<objects>
|
||||
<controller id="AgC-eL-Hgc" customClass="InterfaceController" customModuleProvider="target"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
@ -1,33 +0,0 @@
|
||||
<?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>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Binary</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
</array>
|
||||
<key>WKCompanionAppBundleIdentifier</key>
|
||||
<string>me.leavez.Binary</string>
|
||||
<key>WKWatchKitApp</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -1,7 +0,0 @@
|
||||
|
||||
# frozen_string_literal: true
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem 'cocoapods', '1.6.1'
|
||||
gem 'cocoapods-binary', :path => "../"
|
||||
|
||||
@ -4,7 +4,6 @@ import sys
|
||||
def wrapper(content):
|
||||
return """
|
||||
platform :ios, '9.0'
|
||||
inhibit_all_warnings!
|
||||
use_frameworks!
|
||||
plugin "cocoapods-binary"
|
||||
|
||||
@ -26,12 +25,6 @@ def save_to_podfile(text):
|
||||
file.write(text[1])
|
||||
file.close()
|
||||
|
||||
path = os.path.dirname(os.path.abspath(__file__))
|
||||
path += "/BinaryWatch Extension/import.swift"
|
||||
file = open(path, "w+")
|
||||
file.write( "" if len(text) <= 2 else text[2])
|
||||
file.close()
|
||||
|
||||
|
||||
|
||||
def initial():
|
||||
@ -43,9 +36,6 @@ pod "Masonry"
|
||||
"""),
|
||||
"""
|
||||
import Masonry
|
||||
class A {
|
||||
let d = UIView().mas_top
|
||||
}
|
||||
""")
|
||||
|
||||
def addSwiftPod():
|
||||
@ -59,10 +49,6 @@ pod "Literal", :binary => true
|
||||
"""
|
||||
import RxCocoa
|
||||
import Literal
|
||||
class A {
|
||||
let a: CGRect = [1,2,3,4]
|
||||
func dd() { NSObject().rx.observe(CGRect.self, "frame") }
|
||||
}
|
||||
""")
|
||||
|
||||
def revertToSourceCode():
|
||||
@ -75,13 +61,7 @@ pod "Literal"
|
||||
"""),
|
||||
"""
|
||||
import RxCocoa
|
||||
import RxSwift
|
||||
import Literal
|
||||
class A {
|
||||
let a: CGRect = [1,2,3,4]
|
||||
let b = Observable.just(1)
|
||||
func dd() { NSObject().rx.observe(CGRect.self, "frame") }
|
||||
}
|
||||
""")
|
||||
|
||||
def addDifferentNamePod():
|
||||
@ -97,11 +77,6 @@ pod "lottie-ios", :binary => true
|
||||
import Masonry
|
||||
import Literal
|
||||
import Lottie
|
||||
class A {
|
||||
let a: CGRect = [1,2,3,4]
|
||||
let a2 = AnimationView.self
|
||||
let d = UIView().mas_top
|
||||
}
|
||||
""")
|
||||
|
||||
|
||||
@ -118,12 +93,6 @@ import Masonry
|
||||
import Literal
|
||||
import Lottie
|
||||
import AFNetworking
|
||||
class A {
|
||||
let a: CGRect = [1,2,3,4]
|
||||
let a2 = AnimationView.self
|
||||
let b = AFNetworkReachabilityManager()
|
||||
let d = UIView().mas_top
|
||||
}
|
||||
""")
|
||||
|
||||
def addVendoredLibPod():
|
||||
@ -138,11 +107,6 @@ pod "GrowingIO", :binary => true
|
||||
import Literal
|
||||
import AFNetworking
|
||||
import Instabug
|
||||
class A {
|
||||
let a: CGRect = [1,2,3,4]
|
||||
let b = AFNetworkReachabilityManager()
|
||||
let c = Instabug.self
|
||||
}
|
||||
""")
|
||||
|
||||
def deleteAPod():
|
||||
@ -154,10 +118,6 @@ pod "AFNetworking/Reachability", :binary => true
|
||||
"""
|
||||
import Literal
|
||||
import AFNetworking
|
||||
class A {
|
||||
let a: CGRect = [1,2,3,4]
|
||||
let b = AFNetworkReachabilityManager()
|
||||
}
|
||||
""")
|
||||
|
||||
def universalFlag():
|
||||
@ -171,67 +131,9 @@ pod "AFNetworking/Reachability"
|
||||
"""
|
||||
import Literal
|
||||
import AFNetworking
|
||||
class A {
|
||||
let a: CGRect = [1,2,3,4]
|
||||
let b = AFNetworkReachabilityManager()
|
||||
}
|
||||
""")
|
||||
|
||||
def multiplePlatforms():
|
||||
return (wrapper(
|
||||
"""
|
||||
pod "Literal", :binary => true
|
||||
pod "AFNetworking/Serialization", :binary => true
|
||||
end
|
||||
|
||||
target 'BinaryWatch Extension' do
|
||||
platform :watchos
|
||||
pod "AFNetworking/Serialization", :binary => true
|
||||
""") ,
|
||||
"""
|
||||
import Literal
|
||||
import AFNetworking
|
||||
class A {
|
||||
let a: CGRect = [1,2,3,4]
|
||||
func dd() { _ = AFURLRequestSerializationErrorDomain }
|
||||
}
|
||||
""",
|
||||
"""
|
||||
import AFNetworking
|
||||
class A {
|
||||
func dd() { _ = AFURLRequestSerializationErrorDomain }
|
||||
}
|
||||
"""
|
||||
)
|
||||
|
||||
def multiplePlatformsWithALLFlag():
|
||||
return (wrapper(
|
||||
"""
|
||||
all_binary!
|
||||
|
||||
pod "Literal"
|
||||
pod "AFNetworking/Serialization"
|
||||
end
|
||||
|
||||
target 'BinaryWatch Extension' do
|
||||
platform :watchos
|
||||
pod "AFNetworking/Serialization"
|
||||
""") ,
|
||||
"""
|
||||
import Literal
|
||||
import AFNetworking
|
||||
class A {
|
||||
let a: CGRect = [1,2,3,4]
|
||||
func dd() { _ = AFURLRequestSerializationErrorDomain }
|
||||
}
|
||||
""",
|
||||
"""
|
||||
import AFNetworking
|
||||
class A {
|
||||
func dd() { _ = AFURLRequestSerializationErrorDomain }
|
||||
}
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
BIN
test/logo.png
BIN
test/logo.png
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB |
49
test/test.sh
49
test/test.sh
@ -2,16 +2,49 @@
|
||||
set -e
|
||||
|
||||
build() {
|
||||
xcodebuild -workspace Binary.xcworkspace -scheme Binary ONLY_ACTIVE_ARCH=YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO -quiet || exit 1
|
||||
}
|
||||
xcodebuild -workspace Binary.xcworkspace -scheme Binary ONLY_ACTIVE_ARCH=YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -quiet || exit 1
|
||||
}
|
||||
|
||||
rm -rf Pods
|
||||
|
||||
cases=("initial" "addSwiftPod" "revertToSourceCode" "addDifferentNamePod" "addSubPod" "deleteAPod" "addVendoredLibPod" "universalFlag" "multiplePlatforms" "multiplePlatformsWithALLFlag")
|
||||
for action in ${cases[@]}; do
|
||||
python change_podfile.py ${action}
|
||||
bundle exec pod install
|
||||
build
|
||||
done
|
||||
python change_podfile.py "initial"
|
||||
pod install
|
||||
build
|
||||
|
||||
#
|
||||
python change_podfile.py "addSwiftPod"
|
||||
pod install
|
||||
build
|
||||
|
||||
#
|
||||
python change_podfile.py "revertToSourceCode"
|
||||
pod install
|
||||
build
|
||||
|
||||
#
|
||||
python change_podfile.py "addDifferentNamePod"
|
||||
pod install
|
||||
build
|
||||
|
||||
#
|
||||
python change_podfile.py "addSubPod"
|
||||
pod install
|
||||
build
|
||||
|
||||
#
|
||||
python change_podfile.py "deleteAPod"
|
||||
pod install
|
||||
build
|
||||
|
||||
#
|
||||
python change_podfile.py "addVendoredLibPod"
|
||||
pod install
|
||||
build
|
||||
|
||||
#
|
||||
python change_podfile.py "universalFlag"
|
||||
pod install
|
||||
build
|
||||
|
||||
#
|
||||
exit 0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user