Skip to content

Instantly share code, notes, and snippets.

View dive's full-sized avatar
👹

Artem Loenko dive

👹
View GitHub Profile
$ otool -L .build/debug/ios-framework-packagePackageTests.xctest/Contents/MacOS/ios-framework-packagePackageTests
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5)
======
/System/Library/Frameworks/UIKit.framework/UIKit (compatibility version 1.0.0, current version 61000.0.0)
======
@rpath/XCTest.framework/Versions/A/XCTest (compatibility version 1.0.0, current version 14460.20.0)
@rpath/libswiftCore.dylib (compatibility version 1.0.0, current version 1000.11.42)
@rpath/libswiftCoreFoundation.dylib (compatibility version 1.0.0, current version 1000.11.42)
@rpath/libswiftCoreGraphics.dylib (compatibility version 1.0.0, current version 1000.11.42)
Compile Swift Module 'ios_framework_package' (1 sources)
Compile Swift Module 'ios_framework_packageTests' (2 sources)
Linking ./.build/x86_64-apple-macosx10.10/debug/ios-framework-packagePackageTests.xctest/Contents/MacOS/ios-framework-packagePackageTests
xctest[77129:8746476]
The bundle "ios-framework-packagePackageTests.xctest" couldn't be loaded because it is damaged \
or missing necessary resources. Try reinstalling the bundle.
xctest[77129:8746476](dlopen_preflight(.build/x86_64-apple-macosx10.10/debug/ios-framework-packagePackageTests.xctest/Contents/MacOS/ios-framework-packagePackageTests):
**Library not loaded: /System/Library/Frameworks/UIKit.framework/UIKit**
@dive
dive / SPM:Article:Swift:Test.sh
Created February 25, 2019 12:31
SPM:Article:Swift:Test
swift test \
-Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" \
-Xswiftc "-target" -Xswiftc "x86_64-apple-ios12.1-simulator"
@dive
dive / SPM:Article:NM.sh
Created February 25, 2019 12:30
SPM:Article:NM
$ nm -extern-only -defined-only -just-symbol-name .build/x86_64-apple-macosx10.10/debug/ios_framework_package.build/ios_framework_package.swift.o
_$S12CoreGraphics7CGFloatVACSBAAWL
_$S12CoreGraphics7CGFloatVACSBAAWl
_$S12CoreGraphics7CGFloatVACSLAAWL
_$S12CoreGraphics7CGFloatVACSLAAWl
_$S21ios_framework_package16FrameworkPackageC11randomColorSo7UIColorCyF
_$S21ios_framework_package16FrameworkPackageCACycfC
_$S21ios_framework_package16FrameworkPackageCACycfc
_$S21ios_framework_package16FrameworkPackageCMa
_$S21ios_framework_package16FrameworkPackageCMm
@dive
dive / SPM:Article:Lipo.bash
Created February 25, 2019 12:29
SPM:Article:Lipo
$ lipo -archs .build/x86_64-apple-macosx10.10/debug/ios_framework_package.build/ios_framework_package.swift.o
x86_64
@dive
dive / SPM:Article:Compile:Module.log
Created February 25, 2019 12:29
SPM:Article:Compile:Module
Compile Swift Module 'ios_framework_package' (1 sources)
@dive
dive / SPM:Article:Swift:Build:Params.sh
Created February 25, 2019 12:28
SPM:Article:Swift:Build:Params
swift build \
-Xswiftc "-sdk" -Xswiftc "`xcrun - sdk iphonesimulator - show-sdk-path`" \
-Xswiftc "-target" -Xswiftc "x86_64-apple-ios12.1-simulator"
@dive
dive / SPM:Article:Swift:Build.sh
Last active February 25, 2019 12:37
SPM:Article:Swift:Build
xcrun -sdk macosx -show-sdk-path
xcrun -sdk macosx -show-sdk-platform-path
xcrun -find clang
xcrun -sdk macosx -find xctest
sandbox-exec -p '(version 1)
@dive
dive / SPM:Article:Compile:Error.swift
Last active February 25, 2019 12:27
SPM:Article:Compile:Error
Compile Swift Module 'ios_framework_package' (1 sources)
./spm-ios-example/ios-framework-package/Sources/ios-framework-package/ios_framework_package.swift:1:8:
error: no such module 'UIKit'
import UIKit
^
error: terminated(1): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool
-f./spm-ios-example/ios-framework-package/.build/debug.yaml main output: ...
@dive
dive / SPM:Article:UIViewController.swift
Created February 25, 2019 12:24
SPM:Article:UIViewController
import UIKit
import class ios_framework_package.FrameworkPackage
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = FrameworkPackage().randomColor()
}
@IBAction func pressed(_ button: UIButton) {
self.view.backgroundColor = FrameworkPackage().randomColor()