Hi there,
I've been quite impressed by how fast buck builds iOS (and Android) applications, and decided to take the plunge. I've been working on deintegrating cocoapods and moving everything to use Carthage/static frameworks. I'm facing a launch error though when I try to run buck install where the application builds and starts to run but then immediately closes without any sort of error.
This is what happens when I run it

The application appears in my simulator, and then opens and closes. Clicking on the icon after that has the effect (opens then closes)
My .BUCK file looks like that:
# iOS
apple_asset_catalog(
name = 'JarvisAssets',
app_icon = 'AppIcon',
dirs = ['jarvis/Assets.xcassets'],
)
apple_resource(
name = 'JarvisResources',
dirs = [],
files = glob(['jarvis/*.png','jarvis/*.storyboard', 'jarvis/*.xib', 'jarvis/Fonts/*.ttf', 'jarvis/Geomanist OTF/*.otf']),
)
apple_binary(
name = 'JarvisBinary',
configs = {
'Development': {
'PRODUCT_NAME' : 'Jarvis',
'PRODUCT_MODULE_NAME' : 'jarvis',
'CLANG_ENABLE_MODULES' : 'YES',
'PROVISIONING_PROFILE_SPECIFIER' : '',
'DEVELOPMENT_TEAM' : 'xxx',
'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' : 'YES',
'PRODUCT_BUNDLE_IDENTIFIER' : 'xxx',
'ONLY_ACTIVE_ARCH' : 'YES',
'CODE_SIGN_ENTITLEMENTS' : 'jarvis/jarvis.entitlements',
'SWIFT_OPTIMIZATION_LEVEL' : '-Onone',
'GCC_OPTIMIZATION_LEVEL' : '0',
'VALIDATE_PRODUCT' : 'NO',
},
},
preprocessor_flags = [
'-fobjc-arc',
'-fno-objc-arc-exceptions',
'-Qunused-arguments',
],
srcs = glob([
'jarvis/**/*.m',
'jarvis/**/*.mm',
'jarvis/**/*.swift',
]),
headers = glob([
'jarvis/**/*.h',
]),
bridging_header = 'jarvis/Jarvis-Bridging-Header.h',
frameworks = [
'$SDKROOT/System/Library/Frameworks/SystemConfiguration.framework',
'$SDKROOT/System/Library/Frameworks/OpenGLES.framework',
'$SDKROOT/System/Library/Frameworks/AVFoundation.framework',
'$SDKROOT/System/Library/Frameworks/Foundation.framework',
'$SDKROOT/System/Library/Frameworks/UIKit.framework',
'$SDKROOT/System/Library/Frameworks/CoreMotion.framework',
'$SDKROOT/System/Library/Frameworks/CoreLocation.framework',
'$SDKROOT/System/Library/Frameworks/MobileCoreServices.framework',
'$SDKROOT/System/Library/Frameworks/CoreMedia.framework',
'$SDKROOT/System/Library/Frameworks/CFNetwork.framework',
],
visibility = ['PUBLIC'],
deps = [
':JarvisAssets',
':JarvisResources',
':Fabric',
':Answers',
':Nimble',
':Quick',
':Sentry',
':Crash',
':AppleCalendar',
':CryptoSwift',
':JWT',
':KeychainAccess',
':Alamofire',
':AlamofireObjectMapper',
':Charts',
':EPSignature',
':IQKeyboardManager',
':IQKeyboardManagerSwift',
':ObjectMapper',
':calabash',
':ZDCChat',
':ZDCChatAPI',
],
)
apple_bundle(
name = 'Jarvis',
binary = ':JarvisBinary',
extension = 'app',
info_plist = 'jarvis/Info.plist',
)
apple_package(
name = 'JarvisPackage',
bundle = ':Jarvis',
)
prebuilt_apple_framework(
name = 'Fabric',
preferred_linkage = 'shared',
framework = 'Fabric.framework',
)
prebuilt_apple_framework(
name = 'Answers',
preferred_linkage = 'shared',
framework = 'Answers.framework',
)
prebuilt_apple_framework(
name = 'Nimble',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/Nimble.framework',
)
prebuilt_apple_framework(
name = 'Quick',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/Quick.framework',
)
prebuilt_apple_framework(
name = 'Sentry',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/Sentry.framework',
)
prebuilt_apple_framework(
name = 'Crash',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/KSCrash.framework',
)
prebuilt_apple_framework(
name = 'AppleCalendar',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/JTAppleCalendar.framework',
)
prebuilt_apple_framework(
name = 'CryptoSwift',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/CryptoSwift.framework',
)
prebuilt_apple_framework(
name = 'JWT',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/JWT.framework',
)
prebuilt_apple_framework(
name = 'KeychainAccess',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/KeychainAccess.framework',
)
prebuilt_apple_framework(
name = 'Alamofire',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/Alamofire.framework',
)
prebuilt_apple_framework(
name = 'AlamofireObjectMapper',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/AlamofireObjectMapper.framework',
)
prebuilt_apple_framework(
name = 'Charts',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/Charts.framework',
)
prebuilt_apple_framework(
name = 'EPSignature',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/EPSignature.framework',
)
prebuilt_apple_framework(
name = 'IQKeyboardManager',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/IQKeyboardManager.framework',
)
prebuilt_apple_framework(
name = 'IQKeyboardManagerSwift',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/IQKeyboardManagerSwift.framework',
)
prebuilt_apple_framework(
name = 'ObjectMapper',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/ObjectMapper.framework',
)
prebuilt_apple_framework(
name = 'calabash',
preferred_linkage = 'shared',
framework = 'calabash.framework',
)
prebuilt_apple_framework(
name = 'ZDCChat',
preferred_linkage = 'shared',
framework = 'ZDCChat/ZDCChat.framework',
)
prebuilt_apple_framework(
name = 'ZDCChatAPI',
preferred_linkage = 'shared',
framework = 'ZDCChat/ZDCChatAPI.framework',
)
and my .buckconfig is as follows:
[cache]
mode = dir
dir_max_size = 512MB
[cxx]
cflags = -std=gnu11
cxxflags = -std=c++14 -stdlib=libc++
default_platform = iphonesimulator-x86_64
combined_preprocess_and_compile = true
[project]
ide = xcode
ignore = \
.git, \
.hg, \
.buckd
[swift]
version = 3.0
iOS Simulator Log:
May 11 15:05:03 hostname assertiond[21905]: Submitted job with label: UIKitApplication:xxx[0xe80a][21905]
May 11 15:05:03 hostname SpringBoard[21899]: [xxx] Bootstrap complete with label: UIKitApplication: xxx[0xe80a][21905]
May 11 15:05:03 hostname com.apple.CoreSimulator.SimDevice.3F116BC8-F7F1-4AC5-AC54-F1A7E7EDF8FE.launchd_sim[21875] (UIKitApplication: xxx[0xe80a][21905][47621]): Service exited due to Abort trap: 6
May 11 15:05:03 hostname assertiond[21905]: Deleted job with label: UIKitApplication: xxx[0xe80a][21905]
Would love to get some clue as to why I'm having this issue. Been pouring over documentation and issues but have so far been unable to figure out what's wrong. Thanks!
Is there a crash report at ~/Library/Logs/CoreSimulator?
Nope there isn't a crash report there.
In any case, the console's log from launching the app to the crash can be found here: https://gist.github.com/nikhilsh/8d9f7dc7196970ea541f580052ad4f83
I think the issue is that the apple_bundle doesn't copy in the shared prebuilt_apple_framework's into the bundle. Either that or there's a bug that doesn't set the correct rpaths for the binary link command.
There should be a simulator log, that will contain the reason why the abort is fired.
@robbertvanginkel In the last few lines of my original comment, I did paste in the simulator log, if that is what you're referring to. I wasn't sure if I should use prebuilt_apple_framework for Carthage frameworks, but that was what other developers seemed to be doing.
Sorry, I meant crashlog not regular log. They could also be under ~/Library/Logs/DiagnosticReports/
@robbertvanginkel Yep you're right.
```Process: Jarvis [99876]
Path: /Users/USER/Library/Developer/CoreSimulator/Devices/3F116BC8-F7F1-4AC5-AC54-F1A7E7EDF8FE/data/Containers/Bundle/Application/53152810-2715-431F-A61A-926E2ABCACB3/Jarvis.app/Jarvis
Identifier: Jarvis
Version: 3.0.2 (5)
Code Type: X86-64 (Native)
Parent Process: launchd_sim [88742]
Responsible: Jarvis [99876]
User ID: 681489511
Date/Time: 2017-05-12 11:06:06.040 +0800
OS Version: Mac OS X 10.12.4 (16E195)
Report Version: 12
Anonymous UUID: D3659C15-A559-F637-895D-50EF2B276667
Sleep/Wake UUID: 8C946CBC-987F-4AC3-B0AB-ACC96A2A5540
Time Awake Since Boot: 64000 seconds
Time Since Wake: 2500 seconds
System Integrity Protection: enabled
Crashed Thread: 0
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: DYLD, [0x1] Library missing
Application Specific Information:
dyld: launch, loading dependent libraries
DYLD_FALLBACK_LIBRARY_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib
DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
DYLD_FALLBACK_FRAMEWORK_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks
DYLD_SHARED_REGION=avoid
Dyld Error Message:
Library not loaded: @rpath/Alamofire.framework/Alamofire
Referenced from: /Users/USER/Library/Developer/CoreSimulator/Devices/3F116BC8-F7F1-4AC5-AC54-F1A7E7EDF8FE/data/Containers/Bundle/Application/53152810-2715-431F-A61A-926E2ABCACB3/Jarvis.app/Jarvis
Reason: image not found
Binary Images:
0x10e895000 - 0x10ec1eff7 +sg.com.xxx.jarvis (3.0.2 - 5)
0x10ecc1000 - 0x10ece91f7 +dyld_sim (433.8) <14AD0238-D077-378B-82A8-AC2D2ADC9DDF> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/dyld_sim
0x10ed32000 - 0x10eeeaffb com.apple.avfoundation (2.0 - 1187.37.2.1)
0x10f0a2000 - 0x10f445fff com.apple.CFNetwork (811.4.18 - 811.4.18) <2A3090B3-6B46-3D7E-9873-A347640F5CFE> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x10f745000 - 0x10f7c0ff7 com.apple.corelocation (2101.0.62) <968B790E-5600-3884-85B7-362C28BDF0CA> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/CoreLocation.framework/CoreLocation
0x10f7e6000 - 0x10f85fffb com.apple.CoreMedia (1.0 - 1907.59.2.5) <084059F9-BA6F-30FB-B762-BEB28491F031> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/CoreMedia.framework/CoreMedia
0x10f8d2000 - 0x10fa1cfff com.apple.coremotion (2101.0.62) <9AD61504-57B4-364C-800E-01C55AC03BF7> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/CoreMotion.framework/CoreMotion
0x10fa64000 - 0x10fd43ffb com.apple.Foundation (6.9 - 1349.54) <7D69BB8F-8AB9-3AB1-ADD6-BACB312CE32D> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/Foundation.framework/Foundation
0x10ff97000 - 0x1100beff7 com.apple.MobileCoreServices (775.2.37 - 775.2.37) <1941C856-FF06-38E9-9862-6075A37BAF55> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices
0x11018e000 - 0x11019aff3 com.apple.opengles (14.0.15 - 14.0.15) <6A99078B-1F06-386A-BBF0-3AC61F64A8D6> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/OpenGLES.framework/OpenGLES
0x1101a7000 - 0x110207ff7 com.apple.SystemConfiguration (1.14 - 1.14)
0x110235000 - 0x1110ccfff com.apple.UIKit (1.0 - 1000) <3C74E187-F388-32B7-A167-056A6B9628BB> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/UIKit.framework/UIKit
0x11b0b5000 - 0x11b0f2dc7 dyld (433.5) <8239D0D7-66F6-3C44-A77F-586F74525DA3> /usr/lib/dyld
```
So it seems like the Alamofire library was not copied over properly. Do you have any idea how should I go about doing it? I referenced various issues filed here to get a clue as to how to reference frameworks built by carthage but seems like I went down the wrong lane
cc: @yiding
Try adding your prebuilt_apple_framework targets directly into the apple_bundle's deps field. I realize this is a bit annoying to do, especially if the app gets bigger, as it seems like this information can be derived automatically...
Currently prebuilt_apple_frameworks are not collected from transitive dependencies as the resulting layout is ambiguous and we don't have a good way of specifying it (flatten all frameworks into the top level bundle, nest frameworks into other frameworks, etc). This likely doesn't involve your case of only prebuilt frameworks, but all the code for dealing with framework embedding are entwined and not fully fleshed out. This can probably be improved.
A note in the docs about this would probably be good too.
@yiding thanks for the reply, and sorry for getting back so late. I think I tried out your proposed solution like so:
apple_binary(
name = 'JarvisBinary',
configs = {
'Development': {
'PRODUCT_NAME' : 'Jarvis',
'PRODUCT_MODULE_NAME' : 'jarvis',
'CLANG_ENABLE_MODULES' : 'YES',
'PROVISIONING_PROFILE_SPECIFIER' : '',
'DEVELOPMENT_TEAM' : 'xxx',
'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' : 'YES',
'PRODUCT_BUNDLE_IDENTIFIER' : 'xxx',
'ONLY_ACTIVE_ARCH' : 'YES',
'CODE_SIGN_ENTITLEMENTS' : 'jarvis/jarvis.entitlements',
'SWIFT_OPTIMIZATION_LEVEL' : '-Onone',
'GCC_OPTIMIZATION_LEVEL' : '0',
'VALIDATE_PRODUCT' : 'NO',
},
},
preprocessor_flags = [
'-fobjc-arc',
'-fno-objc-arc-exceptions',
'-Qunused-arguments',
],
srcs = glob([
'jarvis/**/*.m',
'jarvis/**/*.mm',
'jarvis/**/*.swift',
]),
headers = glob([
'jarvis/**/*.h',
]),
bridging_header = 'jarvis/Jarvis-Bridging-Header.h',
frameworks = [
'$SDKROOT/System/Library/Frameworks/SystemConfiguration.framework',
'$SDKROOT/System/Library/Frameworks/OpenGLES.framework',
'$SDKROOT/System/Library/Frameworks/AVFoundation.framework',
'$SDKROOT/System/Library/Frameworks/Foundation.framework',
'$SDKROOT/System/Library/Frameworks/UIKit.framework',
'$SDKROOT/System/Library/Frameworks/CoreMotion.framework',
'$SDKROOT/System/Library/Frameworks/CoreLocation.framework',
'$SDKROOT/System/Library/Frameworks/MobileCoreServices.framework',
'$SDKROOT/System/Library/Frameworks/CoreMedia.framework',
'$SDKROOT/System/Library/Frameworks/CFNetwork.framework',
],
visibility = ['PUBLIC'],
deps = [
':JarvisAssets',
':JarvisResources',
],
)
apple_bundle(
name = 'Jarvis',
binary = ':JarvisBinary',
extension = 'app',
info_plist = 'jarvis/Info.plist',
deps = [
':Mastercard',
':Fabric',
':Answers',
':Nimble',
':Quick',
':Notification',
':Sentry',
':Crash',
':AppleCalendar',
':CryptoSwift',
':JWT',
':KeychainAccess',
':PlatformAuth',
':Alamofire',
':AlamofireObjectMapper',
':Charts',
':EPSignature',
':IQKeyboardManager',
':IQKeyboardManagerSwift',
':ObjectMapper',
':calabash',
],
)
(moved the prebuilt_apple_frameworks from apple_binary to apple_bundle deps field)
I'm getting this error though:

I'm pretty sure that Alamofire supports iphonesimulator-x86_64
The apple_binary might need it in its dependency list as well for linking.
As for the error, what version of buck are you using? I fixed this in:
https://github.com/facebook/buck/commit/7cd86eeafd9baa6c8cc7387f490bd99f7bd43af2
https://github.com/facebook/buck/commit/40933eba3a70cf844714442d6f755e0667a497d4
I'm using buck version 05e85b081b4c0795d9d0204b74fd02ace0eecf31
Hmm, I'm still getting the same error upon adding the prebuilt_apple_frameworks to apple_binary like so:
apple_binary(
name = 'JarvisBinary',
configs = {
'Development': {
'PRODUCT_NAME' : 'Jarvis',
'PRODUCT_MODULE_NAME' : 'jarvis',
'CLANG_ENABLE_MODULES' : 'YES',
'PROVISIONING_PROFILE_SPECIFIER' : '',
'DEVELOPMENT_TEAM' : 'xxx',
'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' : 'YES',
'PRODUCT_BUNDLE_IDENTIFIER' : 'xxx',
'ONLY_ACTIVE_ARCH' : 'YES',
'CODE_SIGN_ENTITLEMENTS' : 'jarvis/jarvis.entitlements',
'SWIFT_OPTIMIZATION_LEVEL' : '-Onone',
'GCC_OPTIMIZATION_LEVEL' : '0',
'VALIDATE_PRODUCT' : 'NO',
},
},
preprocessor_flags = [
'-fobjc-arc',
'-fno-objc-arc-exceptions',
'-Qunused-arguments',
],
srcs = glob([
'jarvis/**/*.m',
'jarvis/**/*.mm',
'jarvis/**/*.swift',
]),
headers = glob([
'jarvis/**/*.h',
]),
bridging_header = 'jarvis/Jarvis-Bridging-Header.h',
frameworks = [
'$SDKROOT/System/Library/Frameworks/SystemConfiguration.framework',
'$SDKROOT/System/Library/Frameworks/OpenGLES.framework',
'$SDKROOT/System/Library/Frameworks/AVFoundation.framework',
'$SDKROOT/System/Library/Frameworks/Foundation.framework',
'$SDKROOT/System/Library/Frameworks/UIKit.framework',
'$SDKROOT/System/Library/Frameworks/CoreMotion.framework',
'$SDKROOT/System/Library/Frameworks/CoreLocation.framework',
'$SDKROOT/System/Library/Frameworks/MobileCoreServices.framework',
'$SDKROOT/System/Library/Frameworks/CoreMedia.framework',
'$SDKROOT/System/Library/Frameworks/CFNetwork.framework',
],
visibility = ['PUBLIC'],
deps = [
':JarvisAssets',
':JarvisResources',
':Mastercard',
':Fabric',
':Answers',
':Nimble',
':Quick',
':Notification',
':Sentry',
':Crash',
':AppleCalendar',
':CryptoSwift',
':JWT',
':KeychainAccess',
':PlatformAuth',
':Alamofire',
':AlamofireObjectMapper',
':Charts',
':EPSignature',
':IQKeyboardManager',
':IQKeyboardManagerSwift',
':ObjectMapper',
':calabash',
],
)
apple_bundle(
name = 'Jarvis',
binary = ':JarvisBinary',
extension = 'app',
info_plist = 'jarvis/Info.plist',
deps = [
':Mastercard',
':Fabric',
':Answers',
':Nimble',
':Quick',
':Notification',
':Sentry',
':Crash',
':AppleCalendar',
':CryptoSwift',
':JWT',
':KeychainAccess',
':PlatformAuth',
':Alamofire',
':AlamofireObjectMapper',
':Charts',
':EPSignature',
':IQKeyboardManager',
':IQKeyboardManagerSwift',
':ObjectMapper',
':calabash',
],
)
Hi @nikhilsh, did you manage to fix this? I'm getting error here 馃槥
@gabrielzanoni Nope I was not able to
@nikhilsh There is a "hack" you need to do. You have to copy the carthage frameworks you're using to a folder called Frameworks and use it as a apple_resource in you apple_bundle.
In your case, it would be something like this:
apple_asset_catalog(
name = 'JarvisAssets',
app_icon = 'AppIcon',
dirs = ['jarvis/Assets.xcassets'],
)
apple_resource(
name = 'JarvisResources',
dirs = [],
files = glob(['jarvis/*.png','jarvis/*.storyboard', 'jarvis/*.xib', 'jarvis/Fonts/*.ttf', 'jarvis/Geomanist OTF/*.otf']),
)
apple_binary(
name = 'JarvisBinary',
configs = {
'Development': {
'PRODUCT_NAME' : 'Jarvis',
'PRODUCT_MODULE_NAME' : 'jarvis',
'CLANG_ENABLE_MODULES' : 'YES',
'PROVISIONING_PROFILE_SPECIFIER' : '',
'DEVELOPMENT_TEAM' : 'xxx',
'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' : 'YES',
'PRODUCT_BUNDLE_IDENTIFIER' : 'xxx',
'ONLY_ACTIVE_ARCH' : 'YES',
'CODE_SIGN_ENTITLEMENTS' : 'jarvis/jarvis.entitlements',
'SWIFT_OPTIMIZATION_LEVEL' : '-Onone',
'GCC_OPTIMIZATION_LEVEL' : '0',
'VALIDATE_PRODUCT' : 'NO',
},
},
preprocessor_flags = [
'-fobjc-arc',
'-fno-objc-arc-exceptions',
'-Qunused-arguments',
],
srcs = glob([
'jarvis/**/*.m',
'jarvis/**/*.mm',
'jarvis/**/*.swift',
]),
headers = glob([
'jarvis/**/*.h',
]),
bridging_header = 'jarvis/Jarvis-Bridging-Header.h',
frameworks = [
'$SDKROOT/System/Library/Frameworks/SystemConfiguration.framework',
'$SDKROOT/System/Library/Frameworks/OpenGLES.framework',
'$SDKROOT/System/Library/Frameworks/AVFoundation.framework',
'$SDKROOT/System/Library/Frameworks/Foundation.framework',
'$SDKROOT/System/Library/Frameworks/UIKit.framework',
'$SDKROOT/System/Library/Frameworks/CoreMotion.framework',
'$SDKROOT/System/Library/Frameworks/CoreLocation.framework',
'$SDKROOT/System/Library/Frameworks/MobileCoreServices.framework',
'$SDKROOT/System/Library/Frameworks/CoreMedia.framework',
'$SDKROOT/System/Library/Frameworks/CFNetwork.framework',
],
visibility = ['PUBLIC'],
deps = [
':JarvisAssets',
':JarvisResources',
':Fabric',
':Answers',
':Nimble',
':Quick',
':Sentry',
':Crash',
':AppleCalendar',
':CryptoSwift',
':JWT',
':KeychainAccess',
':Alamofire',
':AlamofireObjectMapper',
':Charts',
':EPSignature',
':IQKeyboardManager',
':IQKeyboardManagerSwift',
':ObjectMapper',
':calabash',
':ZDCChat',
':ZDCChatAPI',
],
)
apple_bundle(
name = 'Jarvis',
binary = ':JarvisBinary',
extension = 'app',
deps = ['CarthageFrameworks'],
info_plist = 'jarvis/Info.plist',
)
apple_resource(
name = 'CarthageFrameworks',
dirs = ['Frameworks'] # here you put all your carthage frameworks
)
apple_package(
name = 'JarvisPackage',
bundle = ':Jarvis',
)
prebuilt_apple_framework(
name = 'Fabric',
preferred_linkage = 'shared',
framework = 'Fabric.framework',
)
prebuilt_apple_framework(
name = 'Answers',
preferred_linkage = 'shared',
framework = 'Answers.framework',
)
prebuilt_apple_framework(
name = 'Nimble',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/Nimble.framework',
)
prebuilt_apple_framework(
name = 'Quick',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/Quick.framework',
)
prebuilt_apple_framework(
name = 'Sentry',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/Sentry.framework',
)
prebuilt_apple_framework(
name = 'Crash',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/KSCrash.framework',
)
prebuilt_apple_framework(
name = 'AppleCalendar',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/JTAppleCalendar.framework',
)
prebuilt_apple_framework(
name = 'CryptoSwift',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/CryptoSwift.framework',
)
prebuilt_apple_framework(
name = 'JWT',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/JWT.framework',
)
prebuilt_apple_framework(
name = 'KeychainAccess',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/KeychainAccess.framework',
)
prebuilt_apple_framework(
name = 'Alamofire',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/Alamofire.framework',
)
prebuilt_apple_framework(
name = 'AlamofireObjectMapper',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/AlamofireObjectMapper.framework',
)
prebuilt_apple_framework(
name = 'Charts',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/Charts.framework',
)
prebuilt_apple_framework(
name = 'EPSignature',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/EPSignature.framework',
)
prebuilt_apple_framework(
name = 'IQKeyboardManager',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/IQKeyboardManager.framework',
)
prebuilt_apple_framework(
name = 'IQKeyboardManagerSwift',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/IQKeyboardManagerSwift.framework',
)
prebuilt_apple_framework(
name = 'ObjectMapper',
preferred_linkage = 'shared',
framework = 'Carthage/Build/iOS/ObjectMapper.framework',
)
prebuilt_apple_framework(
name = 'calabash',
preferred_linkage = 'shared',
framework = 'calabash.framework',
)
prebuilt_apple_framework(
name = 'ZDCChat',
preferred_linkage = 'shared',
framework = 'ZDCChat/ZDCChat.framework',
)
prebuilt_apple_framework(
name = 'ZDCChatAPI',
preferred_linkage = 'shared',
framework = 'ZDCChat/ZDCChatAPI.framework',
)
Thanks for the tip @gabrielzanoni! Looks like this issue is resolved then. I can't try it out as my team has gone back to using Cocoapods, but I'll close this issue for now
This problem where apple_bundle does not copy the prebuilt_apple_framework into the bundle is well known (https://github.com/airbnb/BuckSample/blob/24472210a105f7e3a5e71842ed79cae7bbc6e07e/Libraries/SwiftWithPrecompiledDependency/BUCK#L9).
The issue tracking it is https://github.com/facebook/buck/issues/2058
@acecilia I don't work on buck anymore, but see my previous comment for an explanation why transitive prebuilt_apple_framework deps are not automatically copied into the bundle: https://github.com/facebook/buck/issues/1339#issuecomment-302251485