├── .gitignore ├── Foo ├── Foo.xcconfig ├── Foo.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcuserdata │ │ └── deggert.xcuserdatad │ │ └── xcschemes │ │ ├── Foo.xcscheme │ │ └── xcschememanagement.plist ├── Foo │ ├── Bar.swift │ ├── Baz.h │ ├── Baz.m │ ├── Foo.h │ ├── Foo.private.modulemap │ ├── FooPrivate │ │ └── module.modulemap │ ├── Info.plist │ ├── Norf.h │ ├── Norf.m │ └── Qux.swift └── FooTests │ ├── FooTests.swift │ └── Info.plist ├── MyApp.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── MyApp.xccheckout │ │ └── WorkspaceSettings.xcsettings └── xcshareddata │ └── xcschemes │ └── MyApp.xcscheme ├── MyApp ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── MyApp-Bridging-Header.h ├── ViewController.swift └── main.m ├── MyAppTests ├── Info.plist └── MyAppTests.m └── README.markdown /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.xcuserdatad -------------------------------------------------------------------------------- /Foo/Foo.xcconfig: -------------------------------------------------------------------------------- 1 | SWIFT_INCLUDE_PATHS = $(SRCROOT)/Foo 2 | MODULEMAP_PRIVATE_FILE = $(SRCROOT)/Foo/Foo.private.modulemap 3 | -------------------------------------------------------------------------------- /Foo/Foo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 3E26E0811A64091B00E02FD8 /* Foo.private.modulemap in Sources */ = {isa = PBXBuildFile; fileRef = 3E26E0801A64091B00E02FD8 /* Foo.private.modulemap */; }; 11 | 3E8CDBC71A605E10001A88DE /* Foo.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E8CDBC61A605E10001A88DE /* Foo.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | 3E8CDBCD1A605E10001A88DE /* Foo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E8CDBC11A605E10001A88DE /* Foo.framework */; }; 13 | 3E8CDBD41A605E10001A88DE /* FooTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E8CDBD31A605E10001A88DE /* FooTests.swift */; }; 14 | 3E8CDBDE1A605F16001A88DE /* Bar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E8CDBDD1A605F16001A88DE /* Bar.swift */; }; 15 | 3E8CDBE11A605F40001A88DE /* Baz.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E8CDBDF1A605F40001A88DE /* Baz.h */; settings = {ATTRIBUTES = (Public, ); }; }; 16 | 3E8CDBE21A605F40001A88DE /* Baz.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E8CDBE01A605F40001A88DE /* Baz.m */; }; 17 | 3E8CDBE41A605F55001A88DE /* Qux.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E8CDBE31A605F55001A88DE /* Qux.swift */; }; 18 | 3E8CDBE71A605F69001A88DE /* Norf.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E8CDBE51A605F69001A88DE /* Norf.h */; settings = {ATTRIBUTES = (Private, ); }; }; 19 | 3E8CDBE81A605F69001A88DE /* Norf.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E8CDBE61A605F69001A88DE /* Norf.m */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | 3E8CDBCE1A605E10001A88DE /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = 3E8CDBB81A605E10001A88DE /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = 3E8CDBC01A605E10001A88DE; 28 | remoteInfo = Foo; 29 | }; 30 | /* End PBXContainerItemProxy section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 3E26E0801A64091B00E02FD8 /* Foo.private.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = Foo.private.modulemap; sourceTree = ""; }; 34 | 3E8CDBC11A605E10001A88DE /* Foo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Foo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 35 | 3E8CDBC51A605E10001A88DE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 36 | 3E8CDBC61A605E10001A88DE /* Foo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Foo.h; sourceTree = ""; }; 37 | 3E8CDBCC1A605E10001A88DE /* FooTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FooTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | 3E8CDBD21A605E10001A88DE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 39 | 3E8CDBD31A605E10001A88DE /* FooTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FooTests.swift; sourceTree = ""; }; 40 | 3E8CDBDD1A605F16001A88DE /* Bar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Bar.swift; sourceTree = ""; }; 41 | 3E8CDBDF1A605F40001A88DE /* Baz.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Baz.h; sourceTree = ""; }; 42 | 3E8CDBE01A605F40001A88DE /* Baz.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Baz.m; sourceTree = ""; }; 43 | 3E8CDBE31A605F55001A88DE /* Qux.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Qux.swift; sourceTree = ""; }; 44 | 3E8CDBE51A605F69001A88DE /* Norf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Norf.h; sourceTree = ""; }; 45 | 3E8CDBE61A605F69001A88DE /* Norf.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Norf.m; sourceTree = ""; }; 46 | 3E8CDBEA1A606033001A88DE /* module.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = ""; }; 47 | 3E8CDC281A60648B001A88DE /* Foo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Foo.xcconfig; sourceTree = ""; }; 48 | /* End PBXFileReference section */ 49 | 50 | /* Begin PBXFrameworksBuildPhase section */ 51 | 3E8CDBBD1A605E10001A88DE /* Frameworks */ = { 52 | isa = PBXFrameworksBuildPhase; 53 | buildActionMask = 2147483647; 54 | files = ( 55 | ); 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | 3E8CDBC91A605E10001A88DE /* Frameworks */ = { 59 | isa = PBXFrameworksBuildPhase; 60 | buildActionMask = 2147483647; 61 | files = ( 62 | 3E8CDBCD1A605E10001A88DE /* Foo.framework in Frameworks */, 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 3E8CDBB71A605E10001A88DE = { 70 | isa = PBXGroup; 71 | children = ( 72 | 3E8CDC281A60648B001A88DE /* Foo.xcconfig */, 73 | 3E8CDBC31A605E10001A88DE /* Foo */, 74 | 3E8CDBD01A605E10001A88DE /* FooTests */, 75 | 3E8CDBC21A605E10001A88DE /* Products */, 76 | ); 77 | sourceTree = ""; 78 | }; 79 | 3E8CDBC21A605E10001A88DE /* Products */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | 3E8CDBC11A605E10001A88DE /* Foo.framework */, 83 | 3E8CDBCC1A605E10001A88DE /* FooTests.xctest */, 84 | ); 85 | name = Products; 86 | sourceTree = ""; 87 | }; 88 | 3E8CDBC31A605E10001A88DE /* Foo */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 3E8CDBC61A605E10001A88DE /* Foo.h */, 92 | 3E8CDBDD1A605F16001A88DE /* Bar.swift */, 93 | 3E8CDBDF1A605F40001A88DE /* Baz.h */, 94 | 3E8CDBE01A605F40001A88DE /* Baz.m */, 95 | 3E8CDBE31A605F55001A88DE /* Qux.swift */, 96 | 3E8CDBE51A605F69001A88DE /* Norf.h */, 97 | 3E8CDBE61A605F69001A88DE /* Norf.m */, 98 | 3E26E0801A64091B00E02FD8 /* Foo.private.modulemap */, 99 | 3E8CDBE91A606007001A88DE /* FooPrivate */, 100 | 3E8CDBC41A605E10001A88DE /* Supporting Files */, 101 | ); 102 | path = Foo; 103 | sourceTree = ""; 104 | }; 105 | 3E8CDBC41A605E10001A88DE /* Supporting Files */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 3E8CDBC51A605E10001A88DE /* Info.plist */, 109 | ); 110 | name = "Supporting Files"; 111 | sourceTree = ""; 112 | }; 113 | 3E8CDBD01A605E10001A88DE /* FooTests */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 3E8CDBD31A605E10001A88DE /* FooTests.swift */, 117 | 3E8CDBD11A605E10001A88DE /* Supporting Files */, 118 | ); 119 | path = FooTests; 120 | sourceTree = ""; 121 | }; 122 | 3E8CDBD11A605E10001A88DE /* Supporting Files */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 3E8CDBD21A605E10001A88DE /* Info.plist */, 126 | ); 127 | name = "Supporting Files"; 128 | sourceTree = ""; 129 | }; 130 | 3E8CDBE91A606007001A88DE /* FooPrivate */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | 3E8CDBEA1A606033001A88DE /* module.modulemap */, 134 | ); 135 | path = FooPrivate; 136 | sourceTree = ""; 137 | }; 138 | /* End PBXGroup section */ 139 | 140 | /* Begin PBXHeadersBuildPhase section */ 141 | 3E8CDBBE1A605E10001A88DE /* Headers */ = { 142 | isa = PBXHeadersBuildPhase; 143 | buildActionMask = 2147483647; 144 | files = ( 145 | 3E8CDBE11A605F40001A88DE /* Baz.h in Headers */, 146 | 3E8CDBC71A605E10001A88DE /* Foo.h in Headers */, 147 | 3E8CDBE71A605F69001A88DE /* Norf.h in Headers */, 148 | ); 149 | runOnlyForDeploymentPostprocessing = 0; 150 | }; 151 | /* End PBXHeadersBuildPhase section */ 152 | 153 | /* Begin PBXNativeTarget section */ 154 | 3E8CDBC01A605E10001A88DE /* Foo */ = { 155 | isa = PBXNativeTarget; 156 | buildConfigurationList = 3E8CDBD71A605E10001A88DE /* Build configuration list for PBXNativeTarget "Foo" */; 157 | buildPhases = ( 158 | 3E8CDBBC1A605E10001A88DE /* Sources */, 159 | 3E8CDBBD1A605E10001A88DE /* Frameworks */, 160 | 3E8CDBBE1A605E10001A88DE /* Headers */, 161 | 3E8CDBBF1A605E10001A88DE /* Resources */, 162 | ); 163 | buildRules = ( 164 | ); 165 | dependencies = ( 166 | ); 167 | name = Foo; 168 | productName = Foo; 169 | productReference = 3E8CDBC11A605E10001A88DE /* Foo.framework */; 170 | productType = "com.apple.product-type.framework"; 171 | }; 172 | 3E8CDBCB1A605E10001A88DE /* FooTests */ = { 173 | isa = PBXNativeTarget; 174 | buildConfigurationList = 3E8CDBDA1A605E10001A88DE /* Build configuration list for PBXNativeTarget "FooTests" */; 175 | buildPhases = ( 176 | 3E8CDBC81A605E10001A88DE /* Sources */, 177 | 3E8CDBC91A605E10001A88DE /* Frameworks */, 178 | 3E8CDBCA1A605E10001A88DE /* Resources */, 179 | ); 180 | buildRules = ( 181 | ); 182 | dependencies = ( 183 | 3E8CDBCF1A605E10001A88DE /* PBXTargetDependency */, 184 | ); 185 | name = FooTests; 186 | productName = FooTests; 187 | productReference = 3E8CDBCC1A605E10001A88DE /* FooTests.xctest */; 188 | productType = "com.apple.product-type.bundle.unit-test"; 189 | }; 190 | /* End PBXNativeTarget section */ 191 | 192 | /* Begin PBXProject section */ 193 | 3E8CDBB81A605E10001A88DE /* Project object */ = { 194 | isa = PBXProject; 195 | attributes = { 196 | LastUpgradeCheck = 0620; 197 | ORGANIZATIONNAME = objc.io; 198 | TargetAttributes = { 199 | 3E8CDBC01A605E10001A88DE = { 200 | CreatedOnToolsVersion = 6.2; 201 | }; 202 | 3E8CDBCB1A605E10001A88DE = { 203 | CreatedOnToolsVersion = 6.2; 204 | }; 205 | }; 206 | }; 207 | buildConfigurationList = 3E8CDBBB1A605E10001A88DE /* Build configuration list for PBXProject "Foo" */; 208 | compatibilityVersion = "Xcode 3.2"; 209 | developmentRegion = English; 210 | hasScannedForEncodings = 0; 211 | knownRegions = ( 212 | en, 213 | ); 214 | mainGroup = 3E8CDBB71A605E10001A88DE; 215 | productRefGroup = 3E8CDBC21A605E10001A88DE /* Products */; 216 | projectDirPath = ""; 217 | projectRoot = ""; 218 | targets = ( 219 | 3E8CDBC01A605E10001A88DE /* Foo */, 220 | 3E8CDBCB1A605E10001A88DE /* FooTests */, 221 | ); 222 | }; 223 | /* End PBXProject section */ 224 | 225 | /* Begin PBXResourcesBuildPhase section */ 226 | 3E8CDBBF1A605E10001A88DE /* Resources */ = { 227 | isa = PBXResourcesBuildPhase; 228 | buildActionMask = 2147483647; 229 | files = ( 230 | ); 231 | runOnlyForDeploymentPostprocessing = 0; 232 | }; 233 | 3E8CDBCA1A605E10001A88DE /* Resources */ = { 234 | isa = PBXResourcesBuildPhase; 235 | buildActionMask = 2147483647; 236 | files = ( 237 | ); 238 | runOnlyForDeploymentPostprocessing = 0; 239 | }; 240 | /* End PBXResourcesBuildPhase section */ 241 | 242 | /* Begin PBXSourcesBuildPhase section */ 243 | 3E8CDBBC1A605E10001A88DE /* Sources */ = { 244 | isa = PBXSourcesBuildPhase; 245 | buildActionMask = 2147483647; 246 | files = ( 247 | 3E8CDBE41A605F55001A88DE /* Qux.swift in Sources */, 248 | 3E8CDBDE1A605F16001A88DE /* Bar.swift in Sources */, 249 | 3E8CDBE81A605F69001A88DE /* Norf.m in Sources */, 250 | 3E26E0811A64091B00E02FD8 /* Foo.private.modulemap in Sources */, 251 | 3E8CDBE21A605F40001A88DE /* Baz.m in Sources */, 252 | ); 253 | runOnlyForDeploymentPostprocessing = 0; 254 | }; 255 | 3E8CDBC81A605E10001A88DE /* Sources */ = { 256 | isa = PBXSourcesBuildPhase; 257 | buildActionMask = 2147483647; 258 | files = ( 259 | 3E8CDBD41A605E10001A88DE /* FooTests.swift in Sources */, 260 | ); 261 | runOnlyForDeploymentPostprocessing = 0; 262 | }; 263 | /* End PBXSourcesBuildPhase section */ 264 | 265 | /* Begin PBXTargetDependency section */ 266 | 3E8CDBCF1A605E10001A88DE /* PBXTargetDependency */ = { 267 | isa = PBXTargetDependency; 268 | target = 3E8CDBC01A605E10001A88DE /* Foo */; 269 | targetProxy = 3E8CDBCE1A605E10001A88DE /* PBXContainerItemProxy */; 270 | }; 271 | /* End PBXTargetDependency section */ 272 | 273 | /* Begin XCBuildConfiguration section */ 274 | 3E8CDBD51A605E10001A88DE /* Debug */ = { 275 | isa = XCBuildConfiguration; 276 | baseConfigurationReference = 3E8CDC281A60648B001A88DE /* Foo.xcconfig */; 277 | buildSettings = { 278 | ALWAYS_SEARCH_USER_PATHS = NO; 279 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 280 | CLANG_CXX_LIBRARY = "libc++"; 281 | CLANG_ENABLE_MODULES = YES; 282 | CLANG_ENABLE_OBJC_ARC = YES; 283 | CLANG_WARN_BOOL_CONVERSION = YES; 284 | CLANG_WARN_CONSTANT_CONVERSION = YES; 285 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 286 | CLANG_WARN_EMPTY_BODY = YES; 287 | CLANG_WARN_ENUM_CONVERSION = YES; 288 | CLANG_WARN_INT_CONVERSION = YES; 289 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 290 | CLANG_WARN_UNREACHABLE_CODE = YES; 291 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 292 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 293 | COPY_PHASE_STRIP = NO; 294 | CURRENT_PROJECT_VERSION = 1; 295 | ENABLE_STRICT_OBJC_MSGSEND = YES; 296 | GCC_C_LANGUAGE_STANDARD = gnu99; 297 | GCC_DYNAMIC_NO_PIC = NO; 298 | GCC_OPTIMIZATION_LEVEL = 0; 299 | GCC_PREPROCESSOR_DEFINITIONS = ( 300 | "DEBUG=1", 301 | "$(inherited)", 302 | ); 303 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 304 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 305 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 306 | GCC_WARN_UNDECLARED_SELECTOR = YES; 307 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 308 | GCC_WARN_UNUSED_FUNCTION = YES; 309 | GCC_WARN_UNUSED_VARIABLE = YES; 310 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 311 | MTL_ENABLE_DEBUG_INFO = YES; 312 | ONLY_ACTIVE_ARCH = YES; 313 | SDKROOT = iphoneos; 314 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 315 | TARGETED_DEVICE_FAMILY = "1,2"; 316 | VERSIONING_SYSTEM = "apple-generic"; 317 | VERSION_INFO_PREFIX = ""; 318 | }; 319 | name = Debug; 320 | }; 321 | 3E8CDBD61A605E10001A88DE /* Release */ = { 322 | isa = XCBuildConfiguration; 323 | baseConfigurationReference = 3E8CDC281A60648B001A88DE /* Foo.xcconfig */; 324 | buildSettings = { 325 | ALWAYS_SEARCH_USER_PATHS = NO; 326 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 327 | CLANG_CXX_LIBRARY = "libc++"; 328 | CLANG_ENABLE_MODULES = YES; 329 | CLANG_ENABLE_OBJC_ARC = YES; 330 | CLANG_WARN_BOOL_CONVERSION = YES; 331 | CLANG_WARN_CONSTANT_CONVERSION = YES; 332 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 333 | CLANG_WARN_EMPTY_BODY = YES; 334 | CLANG_WARN_ENUM_CONVERSION = YES; 335 | CLANG_WARN_INT_CONVERSION = YES; 336 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 337 | CLANG_WARN_UNREACHABLE_CODE = YES; 338 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 339 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 340 | COPY_PHASE_STRIP = NO; 341 | CURRENT_PROJECT_VERSION = 1; 342 | ENABLE_NS_ASSERTIONS = NO; 343 | ENABLE_STRICT_OBJC_MSGSEND = YES; 344 | GCC_C_LANGUAGE_STANDARD = gnu99; 345 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 346 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 347 | GCC_WARN_UNDECLARED_SELECTOR = YES; 348 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 349 | GCC_WARN_UNUSED_FUNCTION = YES; 350 | GCC_WARN_UNUSED_VARIABLE = YES; 351 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 352 | MTL_ENABLE_DEBUG_INFO = NO; 353 | SDKROOT = iphoneos; 354 | TARGETED_DEVICE_FAMILY = "1,2"; 355 | VALIDATE_PRODUCT = YES; 356 | VERSIONING_SYSTEM = "apple-generic"; 357 | VERSION_INFO_PREFIX = ""; 358 | }; 359 | name = Release; 360 | }; 361 | 3E8CDBD81A605E10001A88DE /* Debug */ = { 362 | isa = XCBuildConfiguration; 363 | buildSettings = { 364 | CLANG_ENABLE_MODULES = YES; 365 | DEFINES_MODULE = YES; 366 | DYLIB_COMPATIBILITY_VERSION = 1; 367 | DYLIB_CURRENT_VERSION = 1; 368 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 369 | INFOPLIST_FILE = Foo/Info.plist; 370 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 371 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 372 | PRODUCT_NAME = "$(TARGET_NAME)"; 373 | SKIP_INSTALL = YES; 374 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 375 | }; 376 | name = Debug; 377 | }; 378 | 3E8CDBD91A605E10001A88DE /* Release */ = { 379 | isa = XCBuildConfiguration; 380 | buildSettings = { 381 | CLANG_ENABLE_MODULES = YES; 382 | DEFINES_MODULE = YES; 383 | DYLIB_COMPATIBILITY_VERSION = 1; 384 | DYLIB_CURRENT_VERSION = 1; 385 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 386 | INFOPLIST_FILE = Foo/Info.plist; 387 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 388 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 389 | PRODUCT_NAME = "$(TARGET_NAME)"; 390 | SKIP_INSTALL = YES; 391 | }; 392 | name = Release; 393 | }; 394 | 3E8CDBDB1A605E10001A88DE /* Debug */ = { 395 | isa = XCBuildConfiguration; 396 | buildSettings = { 397 | FRAMEWORK_SEARCH_PATHS = ( 398 | "$(SDKROOT)/Developer/Library/Frameworks", 399 | "$(inherited)", 400 | ); 401 | GCC_PREPROCESSOR_DEFINITIONS = ( 402 | "DEBUG=1", 403 | "$(inherited)", 404 | ); 405 | INFOPLIST_FILE = FooTests/Info.plist; 406 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 407 | PRODUCT_NAME = "$(TARGET_NAME)"; 408 | }; 409 | name = Debug; 410 | }; 411 | 3E8CDBDC1A605E10001A88DE /* Release */ = { 412 | isa = XCBuildConfiguration; 413 | buildSettings = { 414 | FRAMEWORK_SEARCH_PATHS = ( 415 | "$(SDKROOT)/Developer/Library/Frameworks", 416 | "$(inherited)", 417 | ); 418 | INFOPLIST_FILE = FooTests/Info.plist; 419 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 420 | PRODUCT_NAME = "$(TARGET_NAME)"; 421 | }; 422 | name = Release; 423 | }; 424 | /* End XCBuildConfiguration section */ 425 | 426 | /* Begin XCConfigurationList section */ 427 | 3E8CDBBB1A605E10001A88DE /* Build configuration list for PBXProject "Foo" */ = { 428 | isa = XCConfigurationList; 429 | buildConfigurations = ( 430 | 3E8CDBD51A605E10001A88DE /* Debug */, 431 | 3E8CDBD61A605E10001A88DE /* Release */, 432 | ); 433 | defaultConfigurationIsVisible = 0; 434 | defaultConfigurationName = Release; 435 | }; 436 | 3E8CDBD71A605E10001A88DE /* Build configuration list for PBXNativeTarget "Foo" */ = { 437 | isa = XCConfigurationList; 438 | buildConfigurations = ( 439 | 3E8CDBD81A605E10001A88DE /* Debug */, 440 | 3E8CDBD91A605E10001A88DE /* Release */, 441 | ); 442 | defaultConfigurationIsVisible = 0; 443 | defaultConfigurationName = Release; 444 | }; 445 | 3E8CDBDA1A605E10001A88DE /* Build configuration list for PBXNativeTarget "FooTests" */ = { 446 | isa = XCConfigurationList; 447 | buildConfigurations = ( 448 | 3E8CDBDB1A605E10001A88DE /* Debug */, 449 | 3E8CDBDC1A605E10001A88DE /* Release */, 450 | ); 451 | defaultConfigurationIsVisible = 0; 452 | defaultConfigurationName = Release; 453 | }; 454 | /* End XCConfigurationList section */ 455 | }; 456 | rootObject = 3E8CDBB81A605E10001A88DE /* Project object */; 457 | } 458 | -------------------------------------------------------------------------------- /Foo/Foo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Foo/Foo.xcodeproj/xcuserdata/deggert.xcuserdatad/xcschemes/Foo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /Foo/Foo.xcodeproj/xcuserdata/deggert.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Foo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 3E8CDBC01A605E10001A88DE 16 | 17 | primary 18 | 19 | 20 | 3E8CDBCB1A605E10001A88DE 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Foo/Foo/Bar.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Bar.swift 3 | // Foo 4 | // 5 | // Created by Daniel Eggert on 09/01/15. 6 | // Copyright (c) 2015 objc.io. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import FooPrivate 11 | 12 | 13 | 14 | @objc(Bar) 15 | public class Bar: NSObject { 16 | 17 | public func doSomething() { 18 | // We can access Baz, which is public: 19 | let b = Baz() 20 | println("\(b)") 21 | 22 | // We can also access Norf, even though it is not public: 23 | let n = Norf() 24 | println("\(n)") 25 | 26 | let q = Qux() 27 | println("\(q)") 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Foo/Foo/Baz.h: -------------------------------------------------------------------------------- 1 | // 2 | // Baz.h 3 | // Foo 4 | // 5 | // Created by Daniel Eggert on 09/01/15. 6 | // Copyright (c) 2015 objc.io. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | 13 | @interface Baz : NSObject 14 | 15 | - (void)doSomething; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Foo/Foo/Baz.m: -------------------------------------------------------------------------------- 1 | // 2 | // Baz.m 3 | // Foo 4 | // 5 | // Created by Daniel Eggert on 09/01/15. 6 | // Copyright (c) 2015 objc.io. All rights reserved. 7 | // 8 | 9 | #import "Baz.h" 10 | 11 | #import "Norf.h" 12 | 13 | // It's a bit off, but apparently the only way we can access Swift is through a header that lives inside the framework's public "Headers" directory. 14 | #import 15 | 16 | 17 | 18 | @implementation Baz 19 | 20 | - (void)doSomething; 21 | { 22 | NSLog(@"Baz"); 23 | [[[Bar alloc] init] doSomething]; 24 | NSLog(@"%@", [[Norf alloc] init]); 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Foo/Foo/Foo.h: -------------------------------------------------------------------------------- 1 | // 2 | // Foo.h 3 | // Foo 4 | // 5 | // Created by Daniel Eggert on 09/01/15. 6 | // Copyright (c) 2015 objc.io. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | -------------------------------------------------------------------------------- /Foo/Foo/Foo.private.modulemap: -------------------------------------------------------------------------------- 1 | module FooPrivate { 2 | export * 3 | } 4 | -------------------------------------------------------------------------------- /Foo/Foo/FooPrivate/module.modulemap: -------------------------------------------------------------------------------- 1 | /* 2 | This is the private module which is used to make private ObjC headers available to Swift code. 3 | Note how all header files need to be specified with paths relative to this file. 4 | 5 | This file lives inside a folder, and that folder is the actual module. In Xcode the SWIFT_INCLUDE_PATHS needs to include the partent directory to that folder. 6 | */ 7 | module FooPrivate { 8 | header "../Norf.h" 9 | export * 10 | } 11 | -------------------------------------------------------------------------------- /Foo/Foo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | io.objc.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Foo/Foo/Norf.h: -------------------------------------------------------------------------------- 1 | // 2 | // Norf.h 3 | // Foo 4 | // 5 | // Created by Daniel Eggert on 09/01/15. 6 | // Copyright (c) 2015 objc.io. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | 13 | @interface Norf : NSObject 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Foo/Foo/Norf.m: -------------------------------------------------------------------------------- 1 | // 2 | // Norf.m 3 | // Foo 4 | // 5 | // Created by Daniel Eggert on 09/01/15. 6 | // Copyright (c) 2015 objc.io. All rights reserved. 7 | // 8 | 9 | #import "Norf.h" 10 | 11 | #import 12 | 13 | 14 | 15 | 16 | @implementation Norf 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Foo/Foo/Qux.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Qux.swift 3 | // Foo 4 | // 5 | // Created by Daniel Eggert on 09/01/15. 6 | // Copyright (c) 2015 objc.io. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @objc(Qux) 12 | class Qux: NSObject { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /Foo/FooTests/FooTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FooTests.swift 3 | // FooTests 4 | // 5 | // Created by Daniel Eggert on 09/01/15. 6 | // Copyright (c) 2015 objc.io. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | 12 | class FooTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Foo/FooTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | io.objc.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /MyApp.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 3E26E07F1A64087700E02FD8 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E26E07E1A64087700E02FD8 /* ViewController.swift */; }; 11 | 3E8CDBFB1A60643A001A88DE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E8CDBFA1A60643A001A88DE /* main.m */; }; 12 | 3E8CDBFE1A60643A001A88DE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E8CDBFD1A60643A001A88DE /* AppDelegate.m */; }; 13 | 3E8CDC041A60643A001A88DE /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3E8CDC021A60643A001A88DE /* Main.storyboard */; }; 14 | 3E8CDC061A60643A001A88DE /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3E8CDC051A60643A001A88DE /* Images.xcassets */; }; 15 | 3E8CDC091A60643A001A88DE /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3E8CDC071A60643A001A88DE /* LaunchScreen.xib */; }; 16 | 3E8CDC151A60643A001A88DE /* MyAppTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E8CDC141A60643A001A88DE /* MyAppTests.m */; }; 17 | 3E8CDC291A606517001A88DE /* Foo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E8CDC251A60646F001A88DE /* Foo.framework */; }; 18 | 3E8CDC2B1A606535001A88DE /* Foo.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3E8CDC251A60646F001A88DE /* Foo.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 3E8CDC0F1A60643A001A88DE /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 3E8CDBED1A60643A001A88DE /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = 3E8CDBF41A60643A001A88DE; 27 | remoteInfo = MyApp; 28 | }; 29 | 3E8CDC241A60646F001A88DE /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = 3E8CDC1F1A60646F001A88DE /* Foo.xcodeproj */; 32 | proxyType = 2; 33 | remoteGlobalIDString = 3E8CDBC11A605E10001A88DE; 34 | remoteInfo = Foo; 35 | }; 36 | 3E8CDC261A60646F001A88DE /* PBXContainerItemProxy */ = { 37 | isa = PBXContainerItemProxy; 38 | containerPortal = 3E8CDC1F1A60646F001A88DE /* Foo.xcodeproj */; 39 | proxyType = 2; 40 | remoteGlobalIDString = 3E8CDBCC1A605E10001A88DE; 41 | remoteInfo = FooTests; 42 | }; 43 | /* End PBXContainerItemProxy section */ 44 | 45 | /* Begin PBXCopyFilesBuildPhase section */ 46 | 3E8CDC2A1A60651F001A88DE /* Embed Frameworks */ = { 47 | isa = PBXCopyFilesBuildPhase; 48 | buildActionMask = 2147483647; 49 | dstPath = ""; 50 | dstSubfolderSpec = 10; 51 | files = ( 52 | 3E8CDC2B1A606535001A88DE /* Foo.framework in Embed Frameworks */, 53 | ); 54 | name = "Embed Frameworks"; 55 | runOnlyForDeploymentPostprocessing = 0; 56 | }; 57 | /* End PBXCopyFilesBuildPhase section */ 58 | 59 | /* Begin PBXFileReference section */ 60 | 3E26E07D1A64087700E02FD8 /* MyApp-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MyApp-Bridging-Header.h"; sourceTree = ""; }; 61 | 3E26E07E1A64087700E02FD8 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 62 | 3E8CDBF51A60643A001A88DE /* MyApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MyApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 63 | 3E8CDBF91A60643A001A88DE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 64 | 3E8CDBFA1A60643A001A88DE /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 65 | 3E8CDBFC1A60643A001A88DE /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 66 | 3E8CDBFD1A60643A001A88DE /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 67 | 3E8CDC031A60643A001A88DE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 68 | 3E8CDC051A60643A001A88DE /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 69 | 3E8CDC081A60643A001A88DE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 70 | 3E8CDC0E1A60643A001A88DE /* MyAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MyAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 71 | 3E8CDC131A60643A001A88DE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 72 | 3E8CDC141A60643A001A88DE /* MyAppTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyAppTests.m; sourceTree = ""; }; 73 | 3E8CDC1F1A60646F001A88DE /* Foo.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = Foo.xcodeproj; sourceTree = ""; }; 74 | /* End PBXFileReference section */ 75 | 76 | /* Begin PBXFrameworksBuildPhase section */ 77 | 3E8CDBF21A60643A001A88DE /* Frameworks */ = { 78 | isa = PBXFrameworksBuildPhase; 79 | buildActionMask = 2147483647; 80 | files = ( 81 | 3E8CDC291A606517001A88DE /* Foo.framework in Frameworks */, 82 | ); 83 | runOnlyForDeploymentPostprocessing = 0; 84 | }; 85 | 3E8CDC0B1A60643A001A88DE /* Frameworks */ = { 86 | isa = PBXFrameworksBuildPhase; 87 | buildActionMask = 2147483647; 88 | files = ( 89 | ); 90 | runOnlyForDeploymentPostprocessing = 0; 91 | }; 92 | /* End PBXFrameworksBuildPhase section */ 93 | 94 | /* Begin PBXGroup section */ 95 | 3E8CDBEC1A60643A001A88DE = { 96 | isa = PBXGroup; 97 | children = ( 98 | 3E8CDC1E1A606455001A88DE /* Foo */, 99 | 3E8CDBF71A60643A001A88DE /* MyApp */, 100 | 3E8CDC111A60643A001A88DE /* MyAppTests */, 101 | 3E8CDBF61A60643A001A88DE /* Products */, 102 | ); 103 | sourceTree = ""; 104 | }; 105 | 3E8CDBF61A60643A001A88DE /* Products */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 3E8CDBF51A60643A001A88DE /* MyApp.app */, 109 | 3E8CDC0E1A60643A001A88DE /* MyAppTests.xctest */, 110 | ); 111 | name = Products; 112 | sourceTree = ""; 113 | }; 114 | 3E8CDBF71A60643A001A88DE /* MyApp */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | 3E8CDBFC1A60643A001A88DE /* AppDelegate.h */, 118 | 3E8CDBFD1A60643A001A88DE /* AppDelegate.m */, 119 | 3E26E07E1A64087700E02FD8 /* ViewController.swift */, 120 | 3E8CDC021A60643A001A88DE /* Main.storyboard */, 121 | 3E8CDC051A60643A001A88DE /* Images.xcassets */, 122 | 3E8CDC071A60643A001A88DE /* LaunchScreen.xib */, 123 | 3E8CDBF81A60643A001A88DE /* Supporting Files */, 124 | 3E26E07D1A64087700E02FD8 /* MyApp-Bridging-Header.h */, 125 | ); 126 | path = MyApp; 127 | sourceTree = ""; 128 | }; 129 | 3E8CDBF81A60643A001A88DE /* Supporting Files */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | 3E8CDBF91A60643A001A88DE /* Info.plist */, 133 | 3E8CDBFA1A60643A001A88DE /* main.m */, 134 | ); 135 | name = "Supporting Files"; 136 | sourceTree = ""; 137 | }; 138 | 3E8CDC111A60643A001A88DE /* MyAppTests */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | 3E8CDC141A60643A001A88DE /* MyAppTests.m */, 142 | 3E8CDC121A60643A001A88DE /* Supporting Files */, 143 | ); 144 | path = MyAppTests; 145 | sourceTree = ""; 146 | }; 147 | 3E8CDC121A60643A001A88DE /* Supporting Files */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | 3E8CDC131A60643A001A88DE /* Info.plist */, 151 | ); 152 | name = "Supporting Files"; 153 | sourceTree = ""; 154 | }; 155 | 3E8CDC1E1A606455001A88DE /* Foo */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | 3E8CDC1F1A60646F001A88DE /* Foo.xcodeproj */, 159 | ); 160 | path = Foo; 161 | sourceTree = ""; 162 | }; 163 | 3E8CDC201A60646F001A88DE /* Products */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | 3E8CDC251A60646F001A88DE /* Foo.framework */, 167 | 3E8CDC271A60646F001A88DE /* FooTests.xctest */, 168 | ); 169 | name = Products; 170 | sourceTree = ""; 171 | }; 172 | /* End PBXGroup section */ 173 | 174 | /* Begin PBXNativeTarget section */ 175 | 3E8CDBF41A60643A001A88DE /* MyApp */ = { 176 | isa = PBXNativeTarget; 177 | buildConfigurationList = 3E8CDC181A60643A001A88DE /* Build configuration list for PBXNativeTarget "MyApp" */; 178 | buildPhases = ( 179 | 3E8CDBF11A60643A001A88DE /* Sources */, 180 | 3E8CDBF21A60643A001A88DE /* Frameworks */, 181 | 3E8CDBF31A60643A001A88DE /* Resources */, 182 | 3E8CDC2A1A60651F001A88DE /* Embed Frameworks */, 183 | ); 184 | buildRules = ( 185 | ); 186 | dependencies = ( 187 | ); 188 | name = MyApp; 189 | productName = MyApp; 190 | productReference = 3E8CDBF51A60643A001A88DE /* MyApp.app */; 191 | productType = "com.apple.product-type.application"; 192 | }; 193 | 3E8CDC0D1A60643A001A88DE /* MyAppTests */ = { 194 | isa = PBXNativeTarget; 195 | buildConfigurationList = 3E8CDC1B1A60643A001A88DE /* Build configuration list for PBXNativeTarget "MyAppTests" */; 196 | buildPhases = ( 197 | 3E8CDC0A1A60643A001A88DE /* Sources */, 198 | 3E8CDC0B1A60643A001A88DE /* Frameworks */, 199 | 3E8CDC0C1A60643A001A88DE /* Resources */, 200 | ); 201 | buildRules = ( 202 | ); 203 | dependencies = ( 204 | 3E8CDC101A60643A001A88DE /* PBXTargetDependency */, 205 | ); 206 | name = MyAppTests; 207 | productName = MyAppTests; 208 | productReference = 3E8CDC0E1A60643A001A88DE /* MyAppTests.xctest */; 209 | productType = "com.apple.product-type.bundle.unit-test"; 210 | }; 211 | /* End PBXNativeTarget section */ 212 | 213 | /* Begin PBXProject section */ 214 | 3E8CDBED1A60643A001A88DE /* Project object */ = { 215 | isa = PBXProject; 216 | attributes = { 217 | LastUpgradeCheck = 0620; 218 | ORGANIZATIONNAME = objc.io; 219 | TargetAttributes = { 220 | 3E8CDBF41A60643A001A88DE = { 221 | CreatedOnToolsVersion = 6.2; 222 | }; 223 | 3E8CDC0D1A60643A001A88DE = { 224 | CreatedOnToolsVersion = 6.2; 225 | TestTargetID = 3E8CDBF41A60643A001A88DE; 226 | }; 227 | }; 228 | }; 229 | buildConfigurationList = 3E8CDBF01A60643A001A88DE /* Build configuration list for PBXProject "MyApp" */; 230 | compatibilityVersion = "Xcode 3.2"; 231 | developmentRegion = English; 232 | hasScannedForEncodings = 0; 233 | knownRegions = ( 234 | en, 235 | Base, 236 | ); 237 | mainGroup = 3E8CDBEC1A60643A001A88DE; 238 | productRefGroup = 3E8CDBF61A60643A001A88DE /* Products */; 239 | projectDirPath = ""; 240 | projectReferences = ( 241 | { 242 | ProductGroup = 3E8CDC201A60646F001A88DE /* Products */; 243 | ProjectRef = 3E8CDC1F1A60646F001A88DE /* Foo.xcodeproj */; 244 | }, 245 | ); 246 | projectRoot = ""; 247 | targets = ( 248 | 3E8CDBF41A60643A001A88DE /* MyApp */, 249 | 3E8CDC0D1A60643A001A88DE /* MyAppTests */, 250 | ); 251 | }; 252 | /* End PBXProject section */ 253 | 254 | /* Begin PBXReferenceProxy section */ 255 | 3E8CDC251A60646F001A88DE /* Foo.framework */ = { 256 | isa = PBXReferenceProxy; 257 | fileType = wrapper.framework; 258 | path = Foo.framework; 259 | remoteRef = 3E8CDC241A60646F001A88DE /* PBXContainerItemProxy */; 260 | sourceTree = BUILT_PRODUCTS_DIR; 261 | }; 262 | 3E8CDC271A60646F001A88DE /* FooTests.xctest */ = { 263 | isa = PBXReferenceProxy; 264 | fileType = wrapper.cfbundle; 265 | path = FooTests.xctest; 266 | remoteRef = 3E8CDC261A60646F001A88DE /* PBXContainerItemProxy */; 267 | sourceTree = BUILT_PRODUCTS_DIR; 268 | }; 269 | /* End PBXReferenceProxy section */ 270 | 271 | /* Begin PBXResourcesBuildPhase section */ 272 | 3E8CDBF31A60643A001A88DE /* Resources */ = { 273 | isa = PBXResourcesBuildPhase; 274 | buildActionMask = 2147483647; 275 | files = ( 276 | 3E8CDC041A60643A001A88DE /* Main.storyboard in Resources */, 277 | 3E8CDC091A60643A001A88DE /* LaunchScreen.xib in Resources */, 278 | 3E8CDC061A60643A001A88DE /* Images.xcassets in Resources */, 279 | ); 280 | runOnlyForDeploymentPostprocessing = 0; 281 | }; 282 | 3E8CDC0C1A60643A001A88DE /* Resources */ = { 283 | isa = PBXResourcesBuildPhase; 284 | buildActionMask = 2147483647; 285 | files = ( 286 | ); 287 | runOnlyForDeploymentPostprocessing = 0; 288 | }; 289 | /* End PBXResourcesBuildPhase section */ 290 | 291 | /* Begin PBXSourcesBuildPhase section */ 292 | 3E8CDBF11A60643A001A88DE /* Sources */ = { 293 | isa = PBXSourcesBuildPhase; 294 | buildActionMask = 2147483647; 295 | files = ( 296 | 3E26E07F1A64087700E02FD8 /* ViewController.swift in Sources */, 297 | 3E8CDBFE1A60643A001A88DE /* AppDelegate.m in Sources */, 298 | 3E8CDBFB1A60643A001A88DE /* main.m in Sources */, 299 | ); 300 | runOnlyForDeploymentPostprocessing = 0; 301 | }; 302 | 3E8CDC0A1A60643A001A88DE /* Sources */ = { 303 | isa = PBXSourcesBuildPhase; 304 | buildActionMask = 2147483647; 305 | files = ( 306 | 3E8CDC151A60643A001A88DE /* MyAppTests.m in Sources */, 307 | ); 308 | runOnlyForDeploymentPostprocessing = 0; 309 | }; 310 | /* End PBXSourcesBuildPhase section */ 311 | 312 | /* Begin PBXTargetDependency section */ 313 | 3E8CDC101A60643A001A88DE /* PBXTargetDependency */ = { 314 | isa = PBXTargetDependency; 315 | target = 3E8CDBF41A60643A001A88DE /* MyApp */; 316 | targetProxy = 3E8CDC0F1A60643A001A88DE /* PBXContainerItemProxy */; 317 | }; 318 | /* End PBXTargetDependency section */ 319 | 320 | /* Begin PBXVariantGroup section */ 321 | 3E8CDC021A60643A001A88DE /* Main.storyboard */ = { 322 | isa = PBXVariantGroup; 323 | children = ( 324 | 3E8CDC031A60643A001A88DE /* Base */, 325 | ); 326 | name = Main.storyboard; 327 | sourceTree = ""; 328 | }; 329 | 3E8CDC071A60643A001A88DE /* LaunchScreen.xib */ = { 330 | isa = PBXVariantGroup; 331 | children = ( 332 | 3E8CDC081A60643A001A88DE /* Base */, 333 | ); 334 | name = LaunchScreen.xib; 335 | sourceTree = ""; 336 | }; 337 | /* End PBXVariantGroup section */ 338 | 339 | /* Begin XCBuildConfiguration section */ 340 | 3E8CDC161A60643A001A88DE /* Debug */ = { 341 | isa = XCBuildConfiguration; 342 | buildSettings = { 343 | ALWAYS_SEARCH_USER_PATHS = NO; 344 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 345 | CLANG_CXX_LIBRARY = "libc++"; 346 | CLANG_ENABLE_MODULES = YES; 347 | CLANG_ENABLE_OBJC_ARC = YES; 348 | CLANG_WARN_BOOL_CONVERSION = YES; 349 | CLANG_WARN_CONSTANT_CONVERSION = YES; 350 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 351 | CLANG_WARN_EMPTY_BODY = YES; 352 | CLANG_WARN_ENUM_CONVERSION = YES; 353 | CLANG_WARN_INT_CONVERSION = YES; 354 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 355 | CLANG_WARN_UNREACHABLE_CODE = YES; 356 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 357 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 358 | COPY_PHASE_STRIP = NO; 359 | ENABLE_STRICT_OBJC_MSGSEND = YES; 360 | GCC_C_LANGUAGE_STANDARD = gnu99; 361 | GCC_DYNAMIC_NO_PIC = NO; 362 | GCC_OPTIMIZATION_LEVEL = 0; 363 | GCC_PREPROCESSOR_DEFINITIONS = ( 364 | "DEBUG=1", 365 | "$(inherited)", 366 | ); 367 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 368 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 369 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 370 | GCC_WARN_UNDECLARED_SELECTOR = YES; 371 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 372 | GCC_WARN_UNUSED_FUNCTION = YES; 373 | GCC_WARN_UNUSED_VARIABLE = YES; 374 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 375 | MTL_ENABLE_DEBUG_INFO = YES; 376 | ONLY_ACTIVE_ARCH = YES; 377 | SDKROOT = iphoneos; 378 | }; 379 | name = Debug; 380 | }; 381 | 3E8CDC171A60643A001A88DE /* Release */ = { 382 | isa = XCBuildConfiguration; 383 | buildSettings = { 384 | ALWAYS_SEARCH_USER_PATHS = NO; 385 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 386 | CLANG_CXX_LIBRARY = "libc++"; 387 | CLANG_ENABLE_MODULES = YES; 388 | CLANG_ENABLE_OBJC_ARC = YES; 389 | CLANG_WARN_BOOL_CONVERSION = YES; 390 | CLANG_WARN_CONSTANT_CONVERSION = YES; 391 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 392 | CLANG_WARN_EMPTY_BODY = YES; 393 | CLANG_WARN_ENUM_CONVERSION = YES; 394 | CLANG_WARN_INT_CONVERSION = YES; 395 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 396 | CLANG_WARN_UNREACHABLE_CODE = YES; 397 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 398 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 399 | COPY_PHASE_STRIP = NO; 400 | ENABLE_NS_ASSERTIONS = NO; 401 | ENABLE_STRICT_OBJC_MSGSEND = YES; 402 | GCC_C_LANGUAGE_STANDARD = gnu99; 403 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 404 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 405 | GCC_WARN_UNDECLARED_SELECTOR = YES; 406 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 407 | GCC_WARN_UNUSED_FUNCTION = YES; 408 | GCC_WARN_UNUSED_VARIABLE = YES; 409 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 410 | MTL_ENABLE_DEBUG_INFO = NO; 411 | SDKROOT = iphoneos; 412 | VALIDATE_PRODUCT = YES; 413 | }; 414 | name = Release; 415 | }; 416 | 3E8CDC191A60643A001A88DE /* Debug */ = { 417 | isa = XCBuildConfiguration; 418 | buildSettings = { 419 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 420 | CLANG_ENABLE_MODULES = YES; 421 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; 422 | INFOPLIST_FILE = MyApp/Info.plist; 423 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 424 | PRODUCT_NAME = "$(TARGET_NAME)"; 425 | SWIFT_OBJC_BRIDGING_HEADER = "MyApp/MyApp-Bridging-Header.h"; 426 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 427 | }; 428 | name = Debug; 429 | }; 430 | 3E8CDC1A1A60643A001A88DE /* Release */ = { 431 | isa = XCBuildConfiguration; 432 | buildSettings = { 433 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 434 | CLANG_ENABLE_MODULES = YES; 435 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; 436 | INFOPLIST_FILE = MyApp/Info.plist; 437 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 438 | PRODUCT_NAME = "$(TARGET_NAME)"; 439 | SWIFT_OBJC_BRIDGING_HEADER = "MyApp/MyApp-Bridging-Header.h"; 440 | }; 441 | name = Release; 442 | }; 443 | 3E8CDC1C1A60643A001A88DE /* Debug */ = { 444 | isa = XCBuildConfiguration; 445 | buildSettings = { 446 | BUNDLE_LOADER = "$(TEST_HOST)"; 447 | FRAMEWORK_SEARCH_PATHS = ( 448 | "$(SDKROOT)/Developer/Library/Frameworks", 449 | "$(inherited)", 450 | ); 451 | GCC_PREPROCESSOR_DEFINITIONS = ( 452 | "DEBUG=1", 453 | "$(inherited)", 454 | ); 455 | INFOPLIST_FILE = MyAppTests/Info.plist; 456 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 457 | PRODUCT_NAME = "$(TARGET_NAME)"; 458 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MyApp.app/MyApp"; 459 | }; 460 | name = Debug; 461 | }; 462 | 3E8CDC1D1A60643A001A88DE /* Release */ = { 463 | isa = XCBuildConfiguration; 464 | buildSettings = { 465 | BUNDLE_LOADER = "$(TEST_HOST)"; 466 | FRAMEWORK_SEARCH_PATHS = ( 467 | "$(SDKROOT)/Developer/Library/Frameworks", 468 | "$(inherited)", 469 | ); 470 | INFOPLIST_FILE = MyAppTests/Info.plist; 471 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 472 | PRODUCT_NAME = "$(TARGET_NAME)"; 473 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MyApp.app/MyApp"; 474 | }; 475 | name = Release; 476 | }; 477 | /* End XCBuildConfiguration section */ 478 | 479 | /* Begin XCConfigurationList section */ 480 | 3E8CDBF01A60643A001A88DE /* Build configuration list for PBXProject "MyApp" */ = { 481 | isa = XCConfigurationList; 482 | buildConfigurations = ( 483 | 3E8CDC161A60643A001A88DE /* Debug */, 484 | 3E8CDC171A60643A001A88DE /* Release */, 485 | ); 486 | defaultConfigurationIsVisible = 0; 487 | defaultConfigurationName = Release; 488 | }; 489 | 3E8CDC181A60643A001A88DE /* Build configuration list for PBXNativeTarget "MyApp" */ = { 490 | isa = XCConfigurationList; 491 | buildConfigurations = ( 492 | 3E8CDC191A60643A001A88DE /* Debug */, 493 | 3E8CDC1A1A60643A001A88DE /* Release */, 494 | ); 495 | defaultConfigurationIsVisible = 0; 496 | defaultConfigurationName = Release; 497 | }; 498 | 3E8CDC1B1A60643A001A88DE /* Build configuration list for PBXNativeTarget "MyAppTests" */ = { 499 | isa = XCConfigurationList; 500 | buildConfigurations = ( 501 | 3E8CDC1C1A60643A001A88DE /* Debug */, 502 | 3E8CDC1D1A60643A001A88DE /* Release */, 503 | ); 504 | defaultConfigurationIsVisible = 0; 505 | defaultConfigurationName = Release; 506 | }; 507 | /* End XCConfigurationList section */ 508 | }; 509 | rootObject = 3E8CDBED1A60643A001A88DE /* Project object */; 510 | } 511 | -------------------------------------------------------------------------------- /MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MyApp.xcodeproj/project.xcworkspace/xcshareddata/MyApp.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 609C6712-C520-469D-836D-CB1733E43DD8 9 | IDESourceControlProjectName 10 | MyApp 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | EB4E39F94418F045110F207CD77C5D4CCFBA143F 14 | github.com:danieleggert/mixed-swift-objc-framework.git 15 | 16 | IDESourceControlProjectPath 17 | MyApp.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | EB4E39F94418F045110F207CD77C5D4CCFBA143F 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | github.com:danieleggert/mixed-swift-objc-framework.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | EB4E39F94418F045110F207CD77C5D4CCFBA143F 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | EB4E39F94418F045110F207CD77C5D4CCFBA143F 36 | IDESourceControlWCCName 37 | mixed-swift-objc-framework 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /MyApp.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /MyApp.xcodeproj/xcshareddata/xcschemes/MyApp.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /MyApp/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // MyApp 4 | // 5 | // Created by Daniel Eggert on 09/01/15. 6 | // Copyright (c) 2015 objc.io. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /MyApp/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // MyApp 4 | // 5 | // Created by Daniel Eggert on 09/01/15. 6 | // Copyright (c) 2015 objc.io. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | #import 12 | 13 | 14 | 15 | @interface AppDelegate () 16 | 17 | @end 18 | 19 | 20 | 21 | @implementation AppDelegate 22 | 23 | 24 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 25 | { 26 | // Here we can access the classes from Foo and check that they work: 27 | 28 | NSLog(@"AppDelegate"); 29 | id baz = [[Baz alloc] init]; 30 | NSLog(@"%@", baz); 31 | [baz doSomething]; 32 | 33 | id bar = [[Bar alloc] init]; 34 | NSLog(@"%@", bar); 35 | 36 | return YES; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /MyApp/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /MyApp/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /MyApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /MyApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | io.objc.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /MyApp/MyApp-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | -------------------------------------------------------------------------------- /MyApp/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // MyApp 4 | // 5 | // Created by Daniel Eggert on 12/01/15. 6 | // Copyright (c) 2015 objc.io. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Foo 11 | 12 | 13 | 14 | class ViewController: UIViewController { 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | 19 | 20 | println("ViewController") 21 | let baz = Baz() 22 | println("\(baz)") 23 | baz.doSomething() 24 | 25 | let bar = Bar() 26 | println("\(bar)") 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /MyApp/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // MyApp 4 | // 5 | // Created by Daniel Eggert on 09/01/15. 6 | // Copyright (c) 2015 objc.io. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /MyAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | io.objc.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /MyAppTests/MyAppTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyAppTests.m 3 | // MyAppTests 4 | // 5 | // Created by Daniel Eggert on 09/01/15. 6 | // Copyright (c) 2015 objc.io. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface MyAppTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation MyAppTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | # How to Mix Swift and Objective-C in a Framework Target 2 | 3 | In an app target, a bridging header does the trick. Inside a framework target, things are trickier. 4 | 5 | Out of the box, Swift code can access ObjC code defined in header files which have an `#import` inside the frameworks umbrella header. These are also the public header files. If we want Swift to access private classes from within the same framework, we have to dance a small dance. 6 | 7 | Inside Swift code we can only `import` so called modules. The trick is to define a module which in turn contains all the ObjC headers that we need the Swift code to access. 8 | 9 | The sample project contains an app *MyApp* which uses a framework called *Foo*. 10 | 11 | ## Foo 12 | 13 | The framework does its usual stuff, and in addition there's a directory called `FooPrivate` -- this is actually a module. Inside it there's a `module.modulemap` file which specifies the ObjC header files with relative paths. The framework target for `Foo` has its `SWIFT_INCLUDE_PATHS` set to `$(SRCROOT)/Foo` which is the parent directory of the `FooPrivate` directory. 14 | 15 | With this, Swift code can `import FooPrivate` and then use (private) ObjC classes. 16 | 17 | ## Private Module 18 | 19 | When Swift code accesses the Foo module created by the framework, it needs to find the FooPrivate module, too. 20 | 21 | We can work around this issue by adding 22 | 23 | module FooPrivate { 24 | export * 25 | } 26 | 27 | to the `.modulemap` of the framework. In Xcode this can be done by simply setting `MODULEMAP_PRIVATE_FILE` to point to a module map file with this content. 28 | --------------------------------------------------------------------------------