Comments (13)
Unfortunately, that's not working for me - in fact, the tool is not working anymore at all with the newest commit (16e022a
), no matter if trying for Obj-C or Swift Pods. Anyone else experiencing this problem, or is it just on my side?
I think it can be broken down to the following issues according to the logs:
- e.g. for AFNetworking (and other Obj-C Pods) (called with
./measure_cocoapod_size.py --cocoapods AFNetworking [--mode objc]
):
...
/var/folders/k_/g8z_4fdj79n0ngb_270tcbl80000gn/T/tmpGFO4Pr/sizetestproject/Pods/Target Support Files/Pods-SizeTest/Pods-SizeTest-frameworks.sh: line 104: EXPANDED_CODE_SIGN_IDENTITY: unbound variable
Command PhaseScriptExecution failed with a nonzero exit code
...
** ARCHIVE FAILED **
The following build commands failed:
PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/xxx/Library/Developer/Xcode/DerivedData/SizeTest-gysxpaegtdsfovbnelkxqiryttlb/Build/Intermediates.noindex/ArchiveIntermediates/SizeTest/IntermediateBuildFilesPath/SizeTest.build/Release-iphoneos/SizeTest.build/Script-721CCCD9C8C383FD44E1354F.sh
(1 failure)
The pods combined add an extra size of -51493 bytes
- e.g. for RxSwift (and other Swift Pods) (called with
./measure_cocoapod_size.py --cocoapods RxSwift --mode swift
):
...
/var/folders/k_/g8z_4fdj79n0ngb_270tcbl80000gn/T/tmpbrLTu_/SwiftApp/SwiftApp/AppDelegate.swift:23:96: error: 'UIApplicationLaunchOptionsKey' has been renamed to 'UIApplication.LaunchOptionsKey'
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
UIApplication.LaunchOptionsKey
UIKit.UIApplicationLaunchOptionsKey:2:18: note: 'UIApplicationLaunchOptionsKey' was obsoleted in Swift 4.2
public typealias UIApplicationLaunchOptionsKey = UIApplication.LaunchOptionsKey
^
/var/folders/k_/g8z_4fdj79n0ngb_270tcbl80000gn/T/tmpbrLTu_/SwiftApp/SwiftApp/AppDelegate.swift:23:8: warning: instance method 'application(_:didFinishLaunchingWithOptions:)' nearly matches optional requirement 'application(_:didFinishLaunchingWithOptions:)' of protocol 'UIApplicationDelegate'
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
^
/var/folders/k_/g8z_4fdj79n0ngb_270tcbl80000gn/T/tmpbrLTu_/SwiftApp/SwiftApp/AppDelegate.swift:23:8: note: move 'application(_:didFinishLaunchingWithOptions:)' to an extension to silence this warning
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
^
/var/folders/k_/g8z_4fdj79n0ngb_270tcbl80000gn/T/tmpbrLTu_/SwiftApp/SwiftApp/AppDelegate.swift:23:8: note: make 'application(_:didFinishLaunchingWithOptions:)' private to silence this warning
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
^
private
UIKit.UIApplicationDelegate:7:26: note: requirement 'application(_:didFinishLaunchingWithOptions:)' declared here
optional public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool
^
** ARCHIVE FAILED **
The following build commands failed:
CompileSwift normal arm64
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)
The pods combined add an extra size of 0 bytes
Any suggestions?
from cocoapods-size.
We probably need a way to pass in SWIFT_VERSION to the script so that we can use this setting while actually building. Assigning this to myself
from cocoapods-size.
Hmm, that doesn't seem necessary. How does pod lib lint
build the pod?
from cocoapods-size.
One can probably just always set SWIFT_VERSION based on the output of "xcrun swift -version"
from cocoapods-size.
great tool, really appreciating your work and effort! but - any news on this issue?
from cocoapods-size.
Fixed by #7.. Use --mode swift to make it work for swift pods. Will update the read me
from cocoapods-size.
I will have a look
from cocoapods-size.
Hey, I am unable to reproduce your issue. Can you check the xcode version you have installed by trying xcode-select --print-path? Also which version of swift do you have?
from cocoapods-size.
Xcode Version is 10.0
Swift Version is 4.2
xcode-select --print-path
gives me /Applications/Xcode.app/Contents/Developer
from cocoapods-size.
@VinayGuthal Looking into your code, I suppose you're not on the latest Xcode & Swift version which causes the problems?
from cocoapods-size.
I tried both ObjC and Swift using Xcode 9 and Xcode 10.
For Xcode 9, both ObjC and Swift work for me.
For Xcode 10, ObjC works but not Swift.
from cocoapods-size.
@pollini : Which exact version of Xcode 10 do you have? There was a known issue with the ObjC problem you have reported: CocoaPods/CocoaPods#8089
from cocoapods-size.
So eventually, I got above issues for Xcode 10 and Swift 4.2 fixed - namely by the following approaches:
- Updating CocoaPods to a version >= 1.6.0 (at the moment of writing it's version 1.6.0.beta.1) - Thanks for pointing me in the right direction @davidair !
- Converting respective Swift code to version 4.2 syntax and setting version 4.2 as the (default) language version in the build settings of the (Swift) project
from cocoapods-size.
Related Issues (10)
- [Question] Does this tool take into consideration pod's dependencies?
- The script measure_cocoapod_size.py is no longer working HOT 1
- Deployment target too low for pod HOT 2
- Description under title title HOT 1
- print() is a function in Python 3 HOT 1
- Script will fail if CocoaPods is not installed but it's not clear that's the cause
- Error with tensorflow lite
- Security Policy violation Binary Artifacts HOT 1
- ARCHIVE FAILED when using Xcode 10.2 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cocoapods-size.