├── .gitignore ├── LICENSE ├── README.md ├── compile.sh ├── sources ├── Bar │ ├── Bar-Bridging-Header.h │ ├── Bar.h │ ├── Bar.m │ └── Bar.swift └── Foo │ ├── Baz.swift │ ├── Foo-Bridging-Header.h │ ├── Foo.h │ ├── Foo.m │ └── Foo.swift └── xcode ├── Bar └── Bar.xcodeproj │ └── project.pbxproj ├── Foo └── Foo.xcodeproj │ └── project.pbxproj └── Swift-Static-Libs.xcworkspace └── contents.xcworkspacedata /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | .DS_Store 3 | xcuserdata -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 Milen Dzhumerov 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | What is this? 2 | ------------- 3 | 4 | This repository shows an example of how to set up mixed modules (i.e., Swift + Obj-C) which compile down to static libraries. Do note that *module* is used to denote a named collection of source code, **not** a Clang Module. 5 | 6 | You **must be running** Xcode 9 beta 4 or later as Swift static libraries were not previously [supported](https://twitter.com/daniel_dunbar/status/889546788633321472). 7 | 8 | Approach 9 | -------- 10 | 11 | The approach presented fulfils the following requirements: 12 | 13 | - Module header files are publicly exposed through imports such as `#import `. 14 | - The same source code can be compiled through the command line or Xcode without any modifications or preprocessing steps. 15 | - Static libraries are produced by both Xcode and through command line compilation. 16 | - Obj-C code is not required to be compiled as modular (i.e., `-fmodules`). 17 | - Module maps are not required. 18 | - Swift and Obj-C can be freely mixed, within and across modules. 19 | 20 | How do I use it? 21 | ---------------- 22 | 23 | - Run `compile.sh` to manually compile the source code. You will find relevant output files in `build/foo/output` and `build/bar/output`. 24 | - Open `Swift-Static-Libs.xcworkspace`, select the `Bar` target from the toolbar and build the library. 25 | 26 | How does it work? 27 | ------------------ 28 | 29 | The setup *almost* works out of the box except for one aspect: you cannot import another module's Obj-C Generated Interface Header through an import like ``. The reason is that `Module-Swift.h` is placed inside a module's own `DerivedSources`. 30 | 31 | To workaround the above issue, there is a custom Run Script build phase which exposes the generated header so that it can be imported using the desired syntax. The code snippet below shows the relevant parts: 32 | 33 | ```shell 34 | FOO_HEADER_DIR="${BUILT_PRODUCTS_DIR}/Foo" 35 | FOO_HEADER_DIR_FOO_SWIFT_H="${FOO_HEADER_DIR}/Foo-Swift.h" 36 | FOO_SWIFT_HEADER="${DERIVED_FILES_DIR}/Foo-Swift.h" 37 | 38 | if [ ! -f "$FOO_HEADER_DIR" ]; then 39 | mkdir -p "$FOO_HEADER_DIR" 40 | fi 41 | 42 | if [ ! -f "${FOO_HEADER_DIR_FOO_SWIFT_H}" ]; then 43 | ln -s "${FOO_SWIFT_HEADER}" "${FOO_HEADER_DIR_FOO_SWIFT_H}" 44 | fi 45 | ``` 46 | 47 | Alternative 1 48 | ------------- 49 | 50 | There's an alternative way to achieve the ability to refer to another module's Obj-C Generated Interface Header through an import like ``. 51 | 52 | - Map `` to `Module-Swift.h`. This can be achieved using a header map. 53 | - Add a module's `DerivedSources` directory to the include path. 54 | 55 | The last part can be achieved in one of the following ways: 56 | 57 | - Guess where all artifacts will be stored. This is usually `~/Library/Developer/Xcode/DerivedData/Name-HASH`. The way the hashes are constructed has been [reverse engineered](https://pewpewthespells.com/blog/xcode_deriveddata_hashes.html) but this approach is fragile due to relying on private behaviour. 58 | - You can just set `SYMROOT` (Build Products Path) in the project settings so that all artifacts are placed in a predictable location. 59 | 60 | If you want to find out more about build locations, check out [Xcode Build Locations](https://pewpewthespells.com/blog/xcode_build_locations.html). 61 | 62 | Alternative 2 63 | ------------- 64 | 65 | This is a simpler variation of the previous alternative: 66 | 67 | - Set [`DERIVED_FILE_DIR`](https://pewpewthespells.com/blog/buildsettings.html#derived_file_dir) in an `xcconfig` file for a particular target. `DERIVED_FILE_DIR` is not shown in Xcode's Build Settings pane but it does work. 68 | - Directly map `` to `$DERIVED_FILE_DIR/Module-Swift.h` using a header map. You will be able to do so because your tool which generates the Xcode project will have knowledge of the `DERIVED_FILE_DIR` for each target (by definition). 69 | 70 | Acknowledgements 71 | ---------------- 72 | 73 | - [Daniel Dunbar](https://github.com/ddunbar) for advice about the best way to make the cross-module import syntax work for the generated Obj-C header. 74 | - [Robbert van Ginkel](https://github.com/robbertvanginkel) for detailed conversations about the Swift compilation process and Xcode project generation. -------------------------------------------------------------------------------- /compile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm -rf build 4 | 5 | # Setup build dirs for Foo 6 | 7 | mkdir -p build/foo/headers/Foo 8 | mkdir -p build/foo/objects 9 | mkdir -p build/foo/modules 10 | mkdir -p build/foo/output 11 | 12 | XCODE_APP="/Applications/Xcode-beta.app" 13 | SDK="${XCODE_APP}/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk" 14 | TOOLCHAIN="${XCODE_APP}/Contents/Developer/Toolchains/XcodeDefault.xctoolchain" 15 | SWIFT_BIN="${TOOLCHAIN}/usr/bin/swift" 16 | CLANG_BIN="${TOOLCHAIN}/usr/bin/clang" 17 | LIBTOOL_BIN="${TOOLCHAIN}/usr/bin/libtool" 18 | SWIFT_MACOSX_LIB_DIR="${TOOLCHAIN}/usr/lib/swift/macosx" 19 | SWIFT_VERSION="3" 20 | 21 | # Setup header symlink tree for Foo 22 | 23 | ln -s ../../../../sources/Foo/Foo.h build/foo/headers/Foo 24 | 25 | # Compile Foo.swift 26 | 27 | $SWIFT_BIN -frontend \ 28 | -c \ 29 | -enable-objc-interop \ 30 | -module-name Foo \ 31 | -swift-version $SWIFT_VERSION \ 32 | -import-objc-header sources/Foo/Foo-Bridging-Header.h \ 33 | -emit-module-path build/foo/modules/Foo.swift.swiftmodule \ 34 | -o build/foo/objects/Foo.swift.o \ 35 | -Xcc -Ibuild/foo/headers \ 36 | -sdk $SDK \ 37 | -primary-file sources/Foo/Foo.swift \ 38 | sources/Foo/Baz.swift 39 | 40 | # Compile Baz.swift 41 | 42 | $SWIFT_BIN -frontend \ 43 | -c \ 44 | -enable-objc-interop \ 45 | -module-name Foo \ 46 | -swift-version $SWIFT_VERSION \ 47 | -import-objc-header sources/Foo/Foo-Bridging-Header.h \ 48 | -emit-module-path build/foo/modules/Baz.swift.swiftmodule \ 49 | -o build/foo/objects/Baz.swift.o \ 50 | -Xcc -Ibuild/foo/headers \ 51 | -sdk $SDK \ 52 | -primary-file sources/Foo/Baz.swift \ 53 | sources/Foo/Foo.swift 54 | 55 | # Generate docs and Foo.swiftmodule 56 | 57 | $SWIFT_BIN -frontend \ 58 | -emit-module \ 59 | -module-name Foo \ 60 | -swift-version $SWIFT_VERSION \ 61 | -o build/foo/output/Foo.swiftmodule \ 62 | -emit-objc-header-path build/foo/headers/Foo/Foo-Swift.h \ 63 | -emit-module-doc-path build/foo/output/Foo.swiftdoc \ 64 | -sdk $SDK \ 65 | -Xcc -Ibuild/foo/headers \ 66 | -Xcc -Ibuild/foo/headers/Foo \ 67 | -import-objc-header sources/Foo/Foo-Bridging-Header.h \ 68 | build/foo/modules/Baz.swift.swiftmodule \ 69 | build/foo/modules/Foo.swift.swiftmodule 70 | 71 | # Compile Foo.m 72 | 73 | $CLANG_BIN \ 74 | -x objective-c \ 75 | -fobjc-arc \ 76 | -Ibuild/foo/headers \ 77 | -Ibuild/foo/headers/Foo \ 78 | -I. \ 79 | -isysroot $SDK \ 80 | -c sources/Foo/Foo.m \ 81 | -o build/foo/objects/Foo.m.o 82 | 83 | # Link libFoo.a 84 | 85 | $LIBTOOL_BIN \ 86 | -static \ 87 | -syslibroot $SDK \ 88 | -L$SWIFT_MACOSX_LIB_DIR \ 89 | -o build/foo/output/libFoo.a \ 90 | build/foo/objects/Baz.swift.o \ 91 | build/foo/objects/Foo.swift.o \ 92 | build/foo/objects/Foo.m.o 93 | 94 | # Setup build dirs for Bar 95 | 96 | mkdir -p build/bar/headers/Bar 97 | mkdir -p build/bar/objects 98 | mkdir -p build/bar/modules 99 | mkdir -p build/bar/output 100 | 101 | # Setup header symlink tree for Bar 102 | 103 | ln -s ../../../../sources/Bar/Bar.h build/bar/headers/Bar 104 | 105 | # Compile Bar.swift 106 | 107 | $SWIFT_BIN -frontend \ 108 | -c \ 109 | -enable-objc-interop \ 110 | -module-name Bar \ 111 | -swift-version $SWIFT_VERSION \ 112 | -import-objc-header sources/Bar/Bar-Bridging-Header.h \ 113 | -emit-module-path build/bar/modules/Bar.swift.swiftmodule \ 114 | -o build/bar/objects/Bar.swift.o \ 115 | -Xcc -Ibuild/bar/headers \ 116 | -Xcc -Ibuild/foo/headers \ 117 | -Ibuild/foo/output \ 118 | -sdk $SDK \ 119 | -primary-file sources/Bar/Bar.swift 120 | 121 | # Generate docs and Bar.swiftmodule 122 | 123 | $SWIFT_BIN -frontend \ 124 | -emit-module \ 125 | -module-name Bar \ 126 | -swift-version $SWIFT_VERSION \ 127 | -o build/bar/output/Bar.swiftmodule \ 128 | -emit-objc-header-path build/bar/headers/Bar/Bar-Swift.h \ 129 | -emit-module-doc-path build/bar/output/Bar.swiftdoc \ 130 | -Xcc -Ibuild/bar/headers \ 131 | -Xcc -Ibuild/foo/headers \ 132 | -sdk $SDK \ 133 | build/bar/modules/Bar.swift.swiftmodule 134 | 135 | # Compile Bar.m 136 | 137 | $CLANG_BIN \ 138 | -x objective-c \ 139 | -fobjc-arc \ 140 | -Ibuild/foo/headers \ 141 | -Ibuild/bar/headers \ 142 | -Ibuild/bar/headers/Bar \ 143 | -isysroot $SDK \ 144 | -I. \ 145 | -c sources/Bar/Bar.m \ 146 | -Wno-nonportable-include-path \ 147 | -o build/bar/objects/Bar.m.o 148 | 149 | # Link libBar.a 150 | 151 | $LIBTOOL_BIN \ 152 | -static \ 153 | -syslibroot $SDK \ 154 | -L$SWIFT_MACOSX_LIB_DIR \ 155 | -o build/bar/output/libBar.a \ 156 | build/bar/objects/Bar.swift.o \ 157 | build/bar/objects/Bar.m.o 158 | -------------------------------------------------------------------------------- /sources/Bar/Bar-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Milen Dzhumerov. All rights reserved. 2 | 3 | #import 4 | #import 5 | -------------------------------------------------------------------------------- /sources/Bar/Bar.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Milen Dzhumerov. All rights reserved. 2 | 3 | #import 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface Bar: NSObject 8 | 9 | -(id)makeBaz; 10 | 11 | @end 12 | 13 | NS_ASSUME_NONNULL_END 14 | -------------------------------------------------------------------------------- /sources/Bar/Bar.m: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Milen Dzhumerov. All rights reserved. 2 | 3 | #import "Bar.h" 4 | 5 | // Needed due to import of CoreMedia in Swift through @import 6 | #import 7 | #import "Bar-Swift.h" 8 | 9 | #import 10 | #import 11 | 12 | @implementation Bar 13 | 14 | -(id)makeBaz { 15 | // Obj-C -> Swift (Foo) 16 | FooLogger *logger = [FooLogger new]; 17 | [logger log]; 18 | 19 | return [BazObject new]; 20 | } 21 | 22 | - (void)useCoreMediaTime { 23 | // Obj-C -> Swift 24 | BarObject *bar = [[BarObject alloc] initWithTime:(CMTime){}]; 25 | NSLog(@"%@", bar); 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /sources/Bar/Bar.swift: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Milen Dzhumerov. All rights reserved. 2 | 3 | import Foundation 4 | import Foo 5 | import CoreMedia 6 | 7 | @objc class BarObject: NSObject { 8 | let time: CMTime 9 | @objc init(time: CMTime) { 10 | self.time = time 11 | } 12 | } 13 | 14 | struct Bar { 15 | // Swift -> Swift (Foo) 16 | let baz: BazStruct 17 | // Swift -> Obj-C (Foo) 18 | let fooObj: FooObject 19 | } 20 | -------------------------------------------------------------------------------- /sources/Foo/Baz.swift: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Milen Dzhumerov. All rights reserved. 2 | 3 | import Foundation 4 | 5 | // Swift-only Types 6 | 7 | public struct BazStruct { 8 | // Swift -> Swift 9 | public let foo: FooStruct 10 | } 11 | 12 | // Obj-C Types 13 | 14 | public class BazObject: NSObject { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /sources/Foo/Foo-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Milen Dzhumerov. All rights reserved. 2 | 3 | #import 4 | -------------------------------------------------------------------------------- /sources/Foo/Foo.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Milen Dzhumerov. All rights reserved. 2 | 3 | #import 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface FooObject: NSObject 8 | - (id)makeBaz; 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /sources/Foo/Foo.m: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Milen Dzhumerov. All rights reserved. 2 | 3 | #import "Foo.h" 4 | 5 | #import "Foo-Swift.h" 6 | 7 | @implementation FooObject 8 | 9 | - (id)makeBaz { 10 | // Obj-C -> Swift 11 | return [BazObject new]; 12 | } 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /sources/Foo/Foo.swift: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 Milen Dzhumerov. All rights reserved. 2 | 3 | import Foundation 4 | 5 | // Swift-only Types 6 | 7 | public struct FooStruct { 8 | let name: String 9 | } 10 | 11 | // Obj-C Types 12 | 13 | @objc public class FooLogger: NSObject { 14 | @objc public func log() { 15 | // Swift -> Obj-C 16 | let foo = FooObject() 17 | print("foo: \(foo.makeBaz())") 18 | } 19 | } 20 | 21 | @objc public class FooSubclass: FooObject { 22 | 23 | } 24 | -------------------------------------------------------------------------------- /xcode/Bar/Bar.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | F36419F31F3762EE00EB9BCA /* libFoo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F36419F21F3762EE00EB9BCA /* libFoo.a */; }; 11 | F36419F61F37634600EB9BCA /* Bar.m in Sources */ = {isa = PBXBuildFile; fileRef = F36419F41F37634600EB9BCA /* Bar.m */; }; 12 | F36419F71F37634600EB9BCA /* Bar.h in Headers */ = {isa = PBXBuildFile; fileRef = F36419F51F37634600EB9BCA /* Bar.h */; }; 13 | F36419FA1F37637600EB9BCA /* Bar.swift in Sources */ = {isa = PBXBuildFile; fileRef = F36419F91F37637600EB9BCA /* Bar.swift */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | F36419DB1F375EBF00EB9BCA /* libBar.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libBar.a; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | F36419F21F3762EE00EB9BCA /* libFoo.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libFoo.a; path = "../../../../Library/Developer/Xcode/DerivedData/Swift-Static-Libs-aqhhdwjcyrmbiahdarsssvwbnbfz/Build/Products/Debug/libFoo.a"; sourceTree = ""; }; 19 | F36419F41F37634600EB9BCA /* Bar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Bar.m; sourceTree = ""; }; 20 | F36419F51F37634600EB9BCA /* Bar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Bar.h; sourceTree = ""; }; 21 | F36419F81F37637600EB9BCA /* Bar-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Bar-Bridging-Header.h"; sourceTree = ""; }; 22 | F36419F91F37637600EB9BCA /* Bar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Bar.swift; sourceTree = ""; }; 23 | /* End PBXFileReference section */ 24 | 25 | /* Begin PBXFrameworksBuildPhase section */ 26 | F36419D81F375EBF00EB9BCA /* Frameworks */ = { 27 | isa = PBXFrameworksBuildPhase; 28 | buildActionMask = 2147483647; 29 | files = ( 30 | F36419F31F3762EE00EB9BCA /* libFoo.a in Frameworks */, 31 | ); 32 | runOnlyForDeploymentPostprocessing = 0; 33 | }; 34 | /* End PBXFrameworksBuildPhase section */ 35 | 36 | /* Begin PBXGroup section */ 37 | F36419D21F375EBF00EB9BCA = { 38 | isa = PBXGroup; 39 | children = ( 40 | F36419DD1F375EBF00EB9BCA /* Bar */, 41 | F36419DC1F375EBF00EB9BCA /* Products */, 42 | F36419F11F3762EE00EB9BCA /* Frameworks */, 43 | ); 44 | sourceTree = ""; 45 | }; 46 | F36419DC1F375EBF00EB9BCA /* Products */ = { 47 | isa = PBXGroup; 48 | children = ( 49 | F36419DB1F375EBF00EB9BCA /* libBar.a */, 50 | ); 51 | name = Products; 52 | sourceTree = ""; 53 | }; 54 | F36419DD1F375EBF00EB9BCA /* Bar */ = { 55 | isa = PBXGroup; 56 | children = ( 57 | F36419F91F37637600EB9BCA /* Bar.swift */, 58 | F36419F51F37634600EB9BCA /* Bar.h */, 59 | F36419F41F37634600EB9BCA /* Bar.m */, 60 | F36419F81F37637600EB9BCA /* Bar-Bridging-Header.h */, 61 | ); 62 | name = Bar; 63 | path = ../../sources/Bar; 64 | sourceTree = ""; 65 | }; 66 | F36419F11F3762EE00EB9BCA /* Frameworks */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | F36419F21F3762EE00EB9BCA /* libFoo.a */, 70 | ); 71 | name = Frameworks; 72 | sourceTree = ""; 73 | }; 74 | /* End PBXGroup section */ 75 | 76 | /* Begin PBXHeadersBuildPhase section */ 77 | F36419D91F375EBF00EB9BCA /* Headers */ = { 78 | isa = PBXHeadersBuildPhase; 79 | buildActionMask = 2147483647; 80 | files = ( 81 | F36419F71F37634600EB9BCA /* Bar.h in Headers */, 82 | ); 83 | runOnlyForDeploymentPostprocessing = 0; 84 | }; 85 | /* End PBXHeadersBuildPhase section */ 86 | 87 | /* Begin PBXNativeTarget section */ 88 | F36419DA1F375EBF00EB9BCA /* Bar */ = { 89 | isa = PBXNativeTarget; 90 | buildConfigurationList = F36419E41F375EBF00EB9BCA /* Build configuration list for PBXNativeTarget "Bar" */; 91 | buildPhases = ( 92 | F36419D71F375EBF00EB9BCA /* Sources */, 93 | F36419D81F375EBF00EB9BCA /* Frameworks */, 94 | F36419D91F375EBF00EB9BCA /* Headers */, 95 | ); 96 | buildRules = ( 97 | ); 98 | dependencies = ( 99 | ); 100 | name = Bar; 101 | productName = Bar; 102 | productReference = F36419DB1F375EBF00EB9BCA /* libBar.a */; 103 | productType = "com.apple.product-type.library.static"; 104 | }; 105 | /* End PBXNativeTarget section */ 106 | 107 | /* Begin PBXProject section */ 108 | F36419D31F375EBF00EB9BCA /* Project object */ = { 109 | isa = PBXProject; 110 | attributes = { 111 | LastUpgradeCheck = 0900; 112 | ORGANIZATIONNAME = "Milen Dzhumerov"; 113 | TargetAttributes = { 114 | F36419DA1F375EBF00EB9BCA = { 115 | CreatedOnToolsVersion = 9.0; 116 | LastSwiftMigration = 0900; 117 | }; 118 | }; 119 | }; 120 | buildConfigurationList = F36419D61F375EBF00EB9BCA /* Build configuration list for PBXProject "Bar" */; 121 | compatibilityVersion = "Xcode 8.0"; 122 | developmentRegion = en; 123 | hasScannedForEncodings = 0; 124 | knownRegions = ( 125 | en, 126 | ); 127 | mainGroup = F36419D21F375EBF00EB9BCA; 128 | productRefGroup = F36419DC1F375EBF00EB9BCA /* Products */; 129 | projectDirPath = ""; 130 | projectRoot = ""; 131 | targets = ( 132 | F36419DA1F375EBF00EB9BCA /* Bar */, 133 | ); 134 | }; 135 | /* End PBXProject section */ 136 | 137 | /* Begin PBXSourcesBuildPhase section */ 138 | F36419D71F375EBF00EB9BCA /* Sources */ = { 139 | isa = PBXSourcesBuildPhase; 140 | buildActionMask = 2147483647; 141 | files = ( 142 | F36419F61F37634600EB9BCA /* Bar.m in Sources */, 143 | F36419FA1F37637600EB9BCA /* Bar.swift in Sources */, 144 | ); 145 | runOnlyForDeploymentPostprocessing = 0; 146 | }; 147 | /* End PBXSourcesBuildPhase section */ 148 | 149 | /* Begin XCBuildConfiguration section */ 150 | F36419E21F375EBF00EB9BCA /* Debug */ = { 151 | isa = XCBuildConfiguration; 152 | buildSettings = { 153 | ALWAYS_SEARCH_USER_PATHS = NO; 154 | CLANG_ANALYZER_NONNULL = YES; 155 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 156 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 157 | CLANG_CXX_LIBRARY = "libc++"; 158 | CLANG_ENABLE_MODULES = NO; 159 | CLANG_ENABLE_OBJC_ARC = YES; 160 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 161 | CLANG_WARN_BOOL_CONVERSION = YES; 162 | CLANG_WARN_COMMA = YES; 163 | CLANG_WARN_CONSTANT_CONVERSION = YES; 164 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 165 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 166 | CLANG_WARN_EMPTY_BODY = YES; 167 | CLANG_WARN_ENUM_CONVERSION = YES; 168 | CLANG_WARN_INFINITE_RECURSION = YES; 169 | CLANG_WARN_INT_CONVERSION = YES; 170 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 171 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 172 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 173 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 174 | CLANG_WARN_STRICT_PROTOTYPES = YES; 175 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 176 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 177 | CLANG_WARN_UNREACHABLE_CODE = YES; 178 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 179 | CODE_SIGN_IDENTITY = "-"; 180 | COPY_PHASE_STRIP = NO; 181 | DEBUG_INFORMATION_FORMAT = dwarf; 182 | ENABLE_STRICT_OBJC_MSGSEND = YES; 183 | ENABLE_TESTABILITY = YES; 184 | GCC_C_LANGUAGE_STANDARD = gnu11; 185 | GCC_DYNAMIC_NO_PIC = NO; 186 | GCC_NO_COMMON_BLOCKS = YES; 187 | GCC_OPTIMIZATION_LEVEL = 0; 188 | GCC_PREPROCESSOR_DEFINITIONS = ( 189 | "DEBUG=1", 190 | "$(inherited)", 191 | ); 192 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 193 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 194 | GCC_WARN_UNDECLARED_SELECTOR = YES; 195 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 196 | GCC_WARN_UNUSED_FUNCTION = YES; 197 | GCC_WARN_UNUSED_VARIABLE = YES; 198 | MACOSX_DEPLOYMENT_TARGET = 10.12; 199 | MTL_ENABLE_DEBUG_INFO = YES; 200 | ONLY_ACTIVE_ARCH = YES; 201 | SDKROOT = macosx; 202 | }; 203 | name = Debug; 204 | }; 205 | F36419E31F375EBF00EB9BCA /* Release */ = { 206 | isa = XCBuildConfiguration; 207 | buildSettings = { 208 | ALWAYS_SEARCH_USER_PATHS = NO; 209 | CLANG_ANALYZER_NONNULL = YES; 210 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 211 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 212 | CLANG_CXX_LIBRARY = "libc++"; 213 | CLANG_ENABLE_MODULES = NO; 214 | CLANG_ENABLE_OBJC_ARC = YES; 215 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 216 | CLANG_WARN_BOOL_CONVERSION = YES; 217 | CLANG_WARN_COMMA = YES; 218 | CLANG_WARN_CONSTANT_CONVERSION = YES; 219 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 220 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 221 | CLANG_WARN_EMPTY_BODY = YES; 222 | CLANG_WARN_ENUM_CONVERSION = YES; 223 | CLANG_WARN_INFINITE_RECURSION = YES; 224 | CLANG_WARN_INT_CONVERSION = YES; 225 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 226 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 227 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 228 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 229 | CLANG_WARN_STRICT_PROTOTYPES = YES; 230 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 231 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 232 | CLANG_WARN_UNREACHABLE_CODE = YES; 233 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 234 | CODE_SIGN_IDENTITY = "-"; 235 | COPY_PHASE_STRIP = NO; 236 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 237 | ENABLE_NS_ASSERTIONS = NO; 238 | ENABLE_STRICT_OBJC_MSGSEND = YES; 239 | GCC_C_LANGUAGE_STANDARD = gnu11; 240 | GCC_NO_COMMON_BLOCKS = YES; 241 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 242 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 243 | GCC_WARN_UNDECLARED_SELECTOR = YES; 244 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 245 | GCC_WARN_UNUSED_FUNCTION = YES; 246 | GCC_WARN_UNUSED_VARIABLE = YES; 247 | MACOSX_DEPLOYMENT_TARGET = 10.12; 248 | MTL_ENABLE_DEBUG_INFO = NO; 249 | SDKROOT = macosx; 250 | }; 251 | name = Release; 252 | }; 253 | F36419E51F375EBF00EB9BCA /* Debug */ = { 254 | isa = XCBuildConfiguration; 255 | buildSettings = { 256 | CLANG_ENABLE_MODULES = YES; 257 | EXECUTABLE_PREFIX = lib; 258 | HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)"; 259 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 260 | PRODUCT_NAME = "$(TARGET_NAME)"; 261 | SWIFT_OBJC_BRIDGING_HEADER = "../../sources/Bar/Bar-Bridging-Header.h"; 262 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 263 | SWIFT_VERSION = 3.0; 264 | }; 265 | name = Debug; 266 | }; 267 | F36419E61F375EBF00EB9BCA /* Release */ = { 268 | isa = XCBuildConfiguration; 269 | buildSettings = { 270 | CLANG_ENABLE_MODULES = YES; 271 | EXECUTABLE_PREFIX = lib; 272 | HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)"; 273 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 274 | PRODUCT_NAME = "$(TARGET_NAME)"; 275 | SWIFT_OBJC_BRIDGING_HEADER = "../../sources/Bar/Bar-Bridging-Header.h"; 276 | SWIFT_VERSION = 3.0; 277 | }; 278 | name = Release; 279 | }; 280 | /* End XCBuildConfiguration section */ 281 | 282 | /* Begin XCConfigurationList section */ 283 | F36419D61F375EBF00EB9BCA /* Build configuration list for PBXProject "Bar" */ = { 284 | isa = XCConfigurationList; 285 | buildConfigurations = ( 286 | F36419E21F375EBF00EB9BCA /* Debug */, 287 | F36419E31F375EBF00EB9BCA /* Release */, 288 | ); 289 | defaultConfigurationIsVisible = 0; 290 | defaultConfigurationName = Release; 291 | }; 292 | F36419E41F375EBF00EB9BCA /* Build configuration list for PBXNativeTarget "Bar" */ = { 293 | isa = XCConfigurationList; 294 | buildConfigurations = ( 295 | F36419E51F375EBF00EB9BCA /* Debug */, 296 | F36419E61F375EBF00EB9BCA /* Release */, 297 | ); 298 | defaultConfigurationIsVisible = 0; 299 | defaultConfigurationName = Release; 300 | }; 301 | /* End XCConfigurationList section */ 302 | }; 303 | rootObject = F36419D31F375EBF00EB9BCA /* Project object */; 304 | } 305 | -------------------------------------------------------------------------------- /xcode/Foo/Foo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | F36419E91F375ED400EB9BCA /* Foo.m in Sources */ = {isa = PBXBuildFile; fileRef = F36419E71F375ED400EB9BCA /* Foo.m */; }; 11 | F36419EA1F375ED400EB9BCA /* Foo.h in Headers */ = {isa = PBXBuildFile; fileRef = F36419E81F375ED400EB9BCA /* Foo.h */; }; 12 | F36419EE1F375EF700EB9BCA /* Foo.swift in Sources */ = {isa = PBXBuildFile; fileRef = F36419EC1F375EF600EB9BCA /* Foo.swift */; }; 13 | F36419EF1F375EF700EB9BCA /* Baz.swift in Sources */ = {isa = PBXBuildFile; fileRef = F36419ED1F375EF600EB9BCA /* Baz.swift */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | F36419C61F375E8B00EB9BCA /* libFoo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libFoo.a; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | F36419E71F375ED400EB9BCA /* Foo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Foo.m; sourceTree = ""; }; 19 | F36419E81F375ED400EB9BCA /* Foo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Foo.h; sourceTree = ""; }; 20 | F36419EB1F375EF600EB9BCA /* Foo-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Foo-Bridging-Header.h"; sourceTree = ""; }; 21 | F36419EC1F375EF600EB9BCA /* Foo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Foo.swift; sourceTree = ""; }; 22 | F36419ED1F375EF600EB9BCA /* Baz.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Baz.swift; sourceTree = ""; }; 23 | /* End PBXFileReference section */ 24 | 25 | /* Begin PBXFrameworksBuildPhase section */ 26 | F36419C31F375E8B00EB9BCA /* Frameworks */ = { 27 | isa = PBXFrameworksBuildPhase; 28 | buildActionMask = 2147483647; 29 | files = ( 30 | ); 31 | runOnlyForDeploymentPostprocessing = 0; 32 | }; 33 | /* End PBXFrameworksBuildPhase section */ 34 | 35 | /* Begin PBXGroup section */ 36 | F36419BD1F375E8B00EB9BCA = { 37 | isa = PBXGroup; 38 | children = ( 39 | F36419C81F375E8B00EB9BCA /* Foo */, 40 | F36419C71F375E8B00EB9BCA /* Products */, 41 | ); 42 | sourceTree = ""; 43 | }; 44 | F36419C71F375E8B00EB9BCA /* Products */ = { 45 | isa = PBXGroup; 46 | children = ( 47 | F36419C61F375E8B00EB9BCA /* libFoo.a */, 48 | ); 49 | name = Products; 50 | sourceTree = ""; 51 | }; 52 | F36419C81F375E8B00EB9BCA /* Foo */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | F36419ED1F375EF600EB9BCA /* Baz.swift */, 56 | F36419EC1F375EF600EB9BCA /* Foo.swift */, 57 | F36419E81F375ED400EB9BCA /* Foo.h */, 58 | F36419E71F375ED400EB9BCA /* Foo.m */, 59 | F36419EB1F375EF600EB9BCA /* Foo-Bridging-Header.h */, 60 | ); 61 | name = Foo; 62 | path = ../../sources/Foo; 63 | sourceTree = ""; 64 | }; 65 | /* End PBXGroup section */ 66 | 67 | /* Begin PBXHeadersBuildPhase section */ 68 | F36419C41F375E8B00EB9BCA /* Headers */ = { 69 | isa = PBXHeadersBuildPhase; 70 | buildActionMask = 2147483647; 71 | files = ( 72 | F36419EA1F375ED400EB9BCA /* Foo.h in Headers */, 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | /* End PBXHeadersBuildPhase section */ 77 | 78 | /* Begin PBXNativeTarget section */ 79 | F36419C51F375E8B00EB9BCA /* Foo */ = { 80 | isa = PBXNativeTarget; 81 | buildConfigurationList = F36419CF1F375E8B00EB9BCA /* Build configuration list for PBXNativeTarget "Foo" */; 82 | buildPhases = ( 83 | F36419C21F375E8B00EB9BCA /* Sources */, 84 | F36419C31F375E8B00EB9BCA /* Frameworks */, 85 | F36419C41F375E8B00EB9BCA /* Headers */, 86 | F36419FB1F3763D600EB9BCA /* Expose Headers */, 87 | ); 88 | buildRules = ( 89 | ); 90 | dependencies = ( 91 | ); 92 | name = Foo; 93 | productName = Foo; 94 | productReference = F36419C61F375E8B00EB9BCA /* libFoo.a */; 95 | productType = "com.apple.product-type.library.static"; 96 | }; 97 | /* End PBXNativeTarget section */ 98 | 99 | /* Begin PBXProject section */ 100 | F36419BE1F375E8B00EB9BCA /* Project object */ = { 101 | isa = PBXProject; 102 | attributes = { 103 | LastUpgradeCheck = 0900; 104 | ORGANIZATIONNAME = "Milen Dzhumerov"; 105 | TargetAttributes = { 106 | F36419C51F375E8B00EB9BCA = { 107 | CreatedOnToolsVersion = 9.0; 108 | LastSwiftMigration = 0900; 109 | }; 110 | }; 111 | }; 112 | buildConfigurationList = F36419C11F375E8B00EB9BCA /* Build configuration list for PBXProject "Foo" */; 113 | compatibilityVersion = "Xcode 8.0"; 114 | developmentRegion = en; 115 | hasScannedForEncodings = 0; 116 | knownRegions = ( 117 | en, 118 | ); 119 | mainGroup = F36419BD1F375E8B00EB9BCA; 120 | productRefGroup = F36419C71F375E8B00EB9BCA /* Products */; 121 | projectDirPath = ""; 122 | projectRoot = ""; 123 | targets = ( 124 | F36419C51F375E8B00EB9BCA /* Foo */, 125 | ); 126 | }; 127 | /* End PBXProject section */ 128 | 129 | /* Begin PBXShellScriptBuildPhase section */ 130 | F36419FB1F3763D600EB9BCA /* Expose Headers */ = { 131 | isa = PBXShellScriptBuildPhase; 132 | buildActionMask = 2147483647; 133 | files = ( 134 | ); 135 | inputPaths = ( 136 | ); 137 | name = "Expose Headers"; 138 | outputPaths = ( 139 | ); 140 | runOnlyForDeploymentPostprocessing = 0; 141 | shellPath = /bin/sh; 142 | shellScript = "FOO_HEADER_DIR=\"${BUILT_PRODUCTS_DIR}/Foo\"\nFOO_HEADER_DIR_FOO_H=\"${FOO_HEADER_DIR}/Foo.h\"\n\nFOO_HEADER_DIR_FOO_SWIFT_H=\"${FOO_HEADER_DIR}/Foo-Swift.h\"\nFOO_SWIFT_HEADER=\"${DERIVED_FILES_DIR}/Foo-Swift.h\"\n\nFOO_SOURCES_DIR=\"${SRCROOT}/../../sources/foo\"\nFOO_SOURCES_DIR_FOO_H=\"${FOO_SOURCES_DIR}/Foo.h\"\n\nif [ ! -f \"$FOO_HEADER_DIR\" ]; then\nmkdir -p \"$FOO_HEADER_DIR\"\nfi\n\nif [ ! -f \"${FOO_HEADER_DIR_FOO_H}\" ]; then\nln -s \"${FOO_SOURCES_DIR_FOO_H}\" \"${FOO_HEADER_DIR_FOO_H}\"\nfi\n\nif [ ! -f \"${FOO_HEADER_DIR_FOO_SWIFT_H}\" ]; then\nln -s \"${FOO_SWIFT_HEADER}\" \"${FOO_HEADER_DIR_FOO_SWIFT_H}\"\nfi\n"; 143 | }; 144 | /* End PBXShellScriptBuildPhase section */ 145 | 146 | /* Begin PBXSourcesBuildPhase section */ 147 | F36419C21F375E8B00EB9BCA /* Sources */ = { 148 | isa = PBXSourcesBuildPhase; 149 | buildActionMask = 2147483647; 150 | files = ( 151 | F36419EE1F375EF700EB9BCA /* Foo.swift in Sources */, 152 | F36419EF1F375EF700EB9BCA /* Baz.swift in Sources */, 153 | F36419E91F375ED400EB9BCA /* Foo.m in Sources */, 154 | ); 155 | runOnlyForDeploymentPostprocessing = 0; 156 | }; 157 | /* End PBXSourcesBuildPhase section */ 158 | 159 | /* Begin XCBuildConfiguration section */ 160 | F36419CD1F375E8B00EB9BCA /* Debug */ = { 161 | isa = XCBuildConfiguration; 162 | buildSettings = { 163 | ALWAYS_SEARCH_USER_PATHS = NO; 164 | CLANG_ANALYZER_NONNULL = YES; 165 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 166 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 167 | CLANG_CXX_LIBRARY = "libc++"; 168 | CLANG_ENABLE_MODULES = NO; 169 | CLANG_ENABLE_OBJC_ARC = YES; 170 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 171 | CLANG_WARN_BOOL_CONVERSION = YES; 172 | CLANG_WARN_COMMA = YES; 173 | CLANG_WARN_CONSTANT_CONVERSION = YES; 174 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 175 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 176 | CLANG_WARN_EMPTY_BODY = YES; 177 | CLANG_WARN_ENUM_CONVERSION = YES; 178 | CLANG_WARN_INFINITE_RECURSION = YES; 179 | CLANG_WARN_INT_CONVERSION = YES; 180 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 181 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 182 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 183 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 184 | CLANG_WARN_STRICT_PROTOTYPES = YES; 185 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 186 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 187 | CLANG_WARN_UNREACHABLE_CODE = YES; 188 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 189 | CODE_SIGN_IDENTITY = "-"; 190 | COPY_PHASE_STRIP = NO; 191 | DEBUG_INFORMATION_FORMAT = dwarf; 192 | ENABLE_STRICT_OBJC_MSGSEND = YES; 193 | ENABLE_TESTABILITY = YES; 194 | GCC_C_LANGUAGE_STANDARD = gnu11; 195 | GCC_DYNAMIC_NO_PIC = NO; 196 | GCC_NO_COMMON_BLOCKS = YES; 197 | GCC_OPTIMIZATION_LEVEL = 0; 198 | GCC_PREPROCESSOR_DEFINITIONS = ( 199 | "DEBUG=1", 200 | "$(inherited)", 201 | ); 202 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 203 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 204 | GCC_WARN_UNDECLARED_SELECTOR = YES; 205 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 206 | GCC_WARN_UNUSED_FUNCTION = YES; 207 | GCC_WARN_UNUSED_VARIABLE = YES; 208 | MACOSX_DEPLOYMENT_TARGET = 10.12; 209 | MTL_ENABLE_DEBUG_INFO = YES; 210 | ONLY_ACTIVE_ARCH = YES; 211 | SDKROOT = macosx; 212 | SWIFT_PRECOMPILE_BRIDGING_HEADER = YES; 213 | USE_HEADERMAP = YES; 214 | }; 215 | name = Debug; 216 | }; 217 | F36419CE1F375E8B00EB9BCA /* Release */ = { 218 | isa = XCBuildConfiguration; 219 | buildSettings = { 220 | ALWAYS_SEARCH_USER_PATHS = NO; 221 | CLANG_ANALYZER_NONNULL = YES; 222 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 223 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 224 | CLANG_CXX_LIBRARY = "libc++"; 225 | CLANG_ENABLE_MODULES = NO; 226 | CLANG_ENABLE_OBJC_ARC = YES; 227 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 228 | CLANG_WARN_BOOL_CONVERSION = YES; 229 | CLANG_WARN_COMMA = YES; 230 | CLANG_WARN_CONSTANT_CONVERSION = YES; 231 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 232 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 233 | CLANG_WARN_EMPTY_BODY = YES; 234 | CLANG_WARN_ENUM_CONVERSION = YES; 235 | CLANG_WARN_INFINITE_RECURSION = YES; 236 | CLANG_WARN_INT_CONVERSION = YES; 237 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 238 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 239 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 240 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 241 | CLANG_WARN_STRICT_PROTOTYPES = YES; 242 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 243 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 244 | CLANG_WARN_UNREACHABLE_CODE = YES; 245 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 246 | CODE_SIGN_IDENTITY = "-"; 247 | COPY_PHASE_STRIP = NO; 248 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 249 | ENABLE_NS_ASSERTIONS = NO; 250 | ENABLE_STRICT_OBJC_MSGSEND = YES; 251 | GCC_C_LANGUAGE_STANDARD = gnu11; 252 | GCC_NO_COMMON_BLOCKS = YES; 253 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 254 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 255 | GCC_WARN_UNDECLARED_SELECTOR = YES; 256 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 257 | GCC_WARN_UNUSED_FUNCTION = YES; 258 | GCC_WARN_UNUSED_VARIABLE = YES; 259 | MACOSX_DEPLOYMENT_TARGET = 10.12; 260 | MTL_ENABLE_DEBUG_INFO = NO; 261 | SDKROOT = macosx; 262 | SWIFT_PRECOMPILE_BRIDGING_HEADER = YES; 263 | USE_HEADERMAP = YES; 264 | }; 265 | name = Release; 266 | }; 267 | F36419D01F375E8B00EB9BCA /* Debug */ = { 268 | isa = XCBuildConfiguration; 269 | buildSettings = { 270 | CLANG_ENABLE_MODULES = YES; 271 | EXECUTABLE_PREFIX = lib; 272 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 273 | PRODUCT_NAME = "$(TARGET_NAME)"; 274 | SWIFT_OBJC_BRIDGING_HEADER = "../../sources/Foo/Foo-Bridging-Header.h"; 275 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 276 | SWIFT_VERSION = 3.0; 277 | }; 278 | name = Debug; 279 | }; 280 | F36419D11F375E8B00EB9BCA /* Release */ = { 281 | isa = XCBuildConfiguration; 282 | buildSettings = { 283 | CLANG_ENABLE_MODULES = YES; 284 | EXECUTABLE_PREFIX = lib; 285 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 286 | PRODUCT_NAME = "$(TARGET_NAME)"; 287 | SWIFT_OBJC_BRIDGING_HEADER = "../../sources/Foo/Foo-Bridging-Header.h"; 288 | SWIFT_VERSION = 3.0; 289 | }; 290 | name = Release; 291 | }; 292 | /* End XCBuildConfiguration section */ 293 | 294 | /* Begin XCConfigurationList section */ 295 | F36419C11F375E8B00EB9BCA /* Build configuration list for PBXProject "Foo" */ = { 296 | isa = XCConfigurationList; 297 | buildConfigurations = ( 298 | F36419CD1F375E8B00EB9BCA /* Debug */, 299 | F36419CE1F375E8B00EB9BCA /* Release */, 300 | ); 301 | defaultConfigurationIsVisible = 0; 302 | defaultConfigurationName = Release; 303 | }; 304 | F36419CF1F375E8B00EB9BCA /* Build configuration list for PBXNativeTarget "Foo" */ = { 305 | isa = XCConfigurationList; 306 | buildConfigurations = ( 307 | F36419D01F375E8B00EB9BCA /* Debug */, 308 | F36419D11F375E8B00EB9BCA /* Release */, 309 | ); 310 | defaultConfigurationIsVisible = 0; 311 | defaultConfigurationName = Release; 312 | }; 313 | /* End XCConfigurationList section */ 314 | }; 315 | rootObject = F36419BE1F375E8B00EB9BCA /* Project object */; 316 | } 317 | -------------------------------------------------------------------------------- /xcode/Swift-Static-Libs.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | --------------------------------------------------------------------------------