Coder Social home page Coder Social logo

bazel-ios / rules_ios Goto Github PK

View Code? Open in Web Editor NEW
270.0 23.0 84.0 64.55 MB

Bazel rules for building iOS applications and frameworks

License: Apache License 2.0

Python 1.53% C 13.31% Objective-C 3.76% Swift 1.68% Starlark 72.39% Shell 2.40% Objective-C++ 0.16% MATLAB 0.01% C++ 4.76% Assembly 0.01%

rules_ios's Introduction

iOS Rules for Bazel

master

rules_ios is community developed Bazel rules that enable you to do iOS development with Bazel end to end.

It seamlessly Bazel builds iOS applications originally written under Xcode with minimal-to-no code changes. It often re-uses ideas and code from rules_swift and rules_apple and it isn't tied to untested or unused features. It generates Xcode projects that just work and makes using Apple Silicon with Bazel a breeze.

Learn more at bazel-ios.github.io

Looking for the CocoaPods/Carthage rules? See this section.

Reference documentation

Click here for the documentation.

Supported Bazel versions

rules_ios depends on rules_apple and rules_swift which are often affected by changes in Bazel itself. This means you generally need to update these rules and rules_ios as you update Bazel.

See the following table for supported release versions.

Bazel release Minimum supported rules version Final supported rules version
7.* 4.4.0 current
6.* 2.0.0 current
5.* 1.0.0 3.2.2
4.* 1.0.0 1.0.0

Supported rules_apple versions

rules_ios depends on rules_apple, we attempt to maintain compatibility with most versions of rules_apple until it becomes too difficult to do so.

See the following table for supported rules_apple release versions.

rules_apple release Minimum supported rules version Final supported rules version
3.5.1 4.3.1 current
3.* 3.* 4.2.1
2.* 2.* 3.2.2
1.* 1.0.0 3.2.2

Getting started

Bzlmod setup

Add the Bazel module to your MODULE.bazel file: See the latest release for an up-to-date snippet!

bazel_dep(name = "rules_ios", version = "x.x.x", repo_name = "build_bazel_rules_ios")

WORKSPACE setup

Add the following lines to your WORKSPACE file. See the latest release for an up-to-date snippet!

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# See https://github.com/bazel-ios/rules_ios/releases/latest
http_archive(
    name = "build_bazel_rules_ios",
    sha256 = "4faa33a671f615500d3ec0d04d89e390103bcc1abb5e973c8fb1c2510af85985",
    url = "https://github.com/bazel-ios/rules_ios/releases/download/1.0.1/rules_ios.1.0.1.tar.gz",
)

load(
    "@build_bazel_rules_ios//rules:repositories.bzl",
    "rules_ios_dependencies"
)

rules_ios_dependencies()

load(
    "@build_bazel_rules_apple//apple:repositories.bzl",
    "apple_rules_dependencies",
)

apple_rules_dependencies()

load(
    "@build_bazel_rules_swift//swift:repositories.bzl",
    "swift_rules_dependencies",
)

swift_rules_dependencies()

load(
    "@build_bazel_apple_support//lib:repositories.bzl",
    "apple_support_dependencies",
)

apple_support_dependencies()

load(
    "@com_google_protobuf//:protobuf_deps.bzl",
    "protobuf_deps",
)

protobuf_deps()

rules_ios pulls a vetted sha of rules_apple and rules_swift - you can find the versions in repositories.bzl.

iOS applications

rules_ios supports all the primitives like apps, extensions, app clips, and widgets

For example, create an iOS app like so:

load("@build_bazel_rules_ios//rules:app.bzl", "ios_application")

ios_application(
    name = "iOS-App",
    srcs = glob(["*.swift"]),
    bundle_id = "com.example.ios-app",
    minimum_os_version = "12.0",
    visibility = ["//visibility:public"],
)

Xcode project generation

See rules_xcodeproj.

Frameworks

Static frameworks with Xcode semantics - easily port existing apps to Bazel

# Builds a static framework
apple_framework(
    name = "Static",
    srcs = glob(["static/*.swift"]),
    bundle_id = "com.example.b",
    data = ["Static.txt"],
    infoplists = ["Info.plist"],
    platforms = {"ios": "12.0"},
    deps = ["//tests/ios/frameworks/dynamic/c"],
)

Dynamic iOS frameworks

rules_ios builds frameworks as static or dynamic - just flip link_dynamic

apple_framework(
    name = "Dynamic",
    srcs = glob(["dynamic/*.swift"]),
    bundle_id = "com.example.a",
    infoplists = ["Info.plist"],
    link_dynamic = True,
    platforms = {"ios": "12.0"},
    deps = [":Static"],
)

Testing - UI / Unit

Easily test iOS applications with Bazel - ui and unit testing rules

load("//rules:test.bzl", "ios_unit_test")

ios_unit_test(
    name = "Unhosted",
    srcs = ["some.swift"],
    minimum_os_version = "12.0",
    deps = [":Dynamic"]
)

Apple Silicon ready

  • Automatically run legacy deps on Apple Silicon - it just works by running arm64-to-sim and more.
  • Testing mechanisms to easily test in ephemeral VMs

Examples

See the tests directory for tested use cases.

Special notes about debugging xcode projects

Debugging does not work in sandbox mode, due to issue #108. The workaround for now is to disable sandboxing in the .bazelrc file.

Bazel version required by current rules is here

Xcode 13 and above supported, to find the last SHA with support for older versions see the list of git tags.

CocoaPods and Carthage

The existing CocoaPods and Carthage rules have been removed for maintenance reasons, instead use these other solutions:

Contributing

For information on contributing / maintaining this repository see: CONTRIBUTING.md

rules_ios's People

Contributors

acecilia avatar amberdixon avatar angelaguardia avatar barbasevich avatar chenxiao0228 avatar codeman9 avatar congt avatar dflems avatar dierksen avatar dnkoutso avatar dostrander avatar erikkerber avatar ethan-gates avatar gyfelton avatar jerrymarino avatar jszumski avatar justinseanmartin avatar karim-alweheshy avatar luispadron avatar mattrobmattrob avatar mccorkill1 avatar nkoroste avatar ob avatar qyang-nj avatar segiddins avatar thiagohmcruz avatar thii avatar tinder-maxwellelliott avatar wileykestner avatar yongjincho92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rules_ios's Issues

[xcodeproj] xcdatamodel group not being rendered correctly under xcode

Step to reproduce:

  1. Open tests/ios/xcodeproj/Test-Import-App-Project.xcodeproj
  2. Add a new datamodel file to project, make sure it is sitting under tests/ios/unit-test/test-import-app/Resources
  3. regenerate the xcodeproj file via bazel run tests/ios/xcodeproj/Test-Imports-App-Project
  4. opened the regenrated xcodeproj
    Expect: what you see is same as before with version control (got children under with version)
    Actual: no children under the new .xcdatamodeld file

Index while building V2 - sans index-import for local exeuction

One major shortcut exists locally to remove index-import: Xcode is fixed to read directly from Bazel's global index store. Then, instead of writing to global index and copying to bazel-out for remote caching, Xcode should can read right from Bazels' global index. A "out of band" sentenial value can noop the code path for bazel-out. (out of band means abstracted from Bazel)

See more info in the design doc

Redundant `swift_library` builds when using apple_framework and ios_application

When using rules_ios, I noticed that there's redundant different builds of a swift_library.

apple_framework(name = "fw", ..)
ios_application(name="app", deps=["fw"])

When running the build, there will be 2 swiftmodules built ( 1 per the app, and 1 per the framework )

bazel build app fw

Additionally it builds 2x of all the transitive swift libraries and also causes issues with cache hits.

Seeing symbol redefinition issues when using a bridging header

Hello There,

I am running into issues with duplicate symbols when using a swift_objc_bridging_header in an ios_application rule. I have a branch here that showcases the issue when running //tests/ios/unit-test/test-imports-app:TestImports-Unit-Tests

01df46d

Any help is appreciated!

xcdatamodeld assets show wrongly on Xcode, resulting in some cases in Xcode automatically introducing changes that show in source control

Hey ๐Ÿ‘‹

I am observing that when generating a project with the xcodeproj rule, the xcdatamodeld assets do not show up correctly: they appear but do not have any xcdatamodel inside. This is a minor issue, as such files are not changing much over time so it is not that important if they show up correctly in the project (they can be opened independly when a change is needed). I think the issue is already tracked in yonaskolb/XcodeGen#893

The problem is that when the xcdatamodeld contains a .xccurrentversion file inside, opening the generated xcode project leads to xcode automatically making changes to such file, which show up in source control.

To reproduce this, do:

git clone -b xcdatamodeld-fix https://github.com/acecilia/rules_ios
cd rules_ios
bazelisk run //tests/ios/xcodeproj:Test-Project-With-Coredata-Model
git diff
// git diff command returns no changes
open tests/ios/xcodeproj/Test-Project-With-Coredata-Model.xcodeproj
// Wait a second here so the xcode project opens
git diff

Last git diff invocation shows the following:

diff --git a/tests/ios/frameworks/core-data-resource-bundle/CoreDataExample/Model.xcdatamodeld/.xccurrentversion b/tests/ios/frameworks/core-data-resource-bundle/CoreDataExample/Model.xcdatamodeld/.xccurrentversion
index 6e25a42..0c67376 100644
--- a/tests/ios/frameworks/core-data-resource-bundle/CoreDataExample/Model.xcdatamodeld/.xccurrentversion
+++ b/tests/ios/frameworks/core-data-resource-bundle/CoreDataExample/Model.xcdatamodeld/.xccurrentversion
@@ -1,8 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
-<dict>
-       <key>_XCCurrentVersionName</key>
-       <string>Model.xcdatamodel</string>
-</dict>
+<dict/>
 </plist>

To work around this I added a include_asset_files attr to the xcodeproj rule. Find it in the xcdatamodeld-fix branch, in https://github.com/acecilia/rules_ios. If you want it, let me know and I will open a PR ๐Ÿš€

Unknown class in Interface Builder file

I have a simple project TestXIB with CustomView.swift and CustomView.xib.
xib file has customClass="CustomView" customModule="TestXIB" customModuleProvider="target" settings.

When I'm running unit tests and trying to instantiate CustomView from xib I get an error:
Unknown class _TtC39TestXIBTests.__internal__.__test_bundle10CustomView in Interface Builder file.

If I either switch from apple_framework to swift_library or remove customModuleProvider="target" from xib all works fine.

Any ideas on how to solve the issue using apple_framework without xib modification.?

[xcodeproj] swift_version isn't propagated in to the project

I have noticed a few attributes of rules aren't propagating into the project. the swift_version might be required in some situations and it's currently just not set

 40 apple_framework(
 41     name = "SwiftLib",
...
 44     swift_version = "3",
...

Multi architecture support / ios_multi_cpus

Hello! I was curious about the status of using --ios_multi_cpus in rules_ios's apple_framework. I've tried to build the test application with this feature and ended up getting the following error:

$ bazel build -s tests/ios/app/App --apple_platform_type=ios --ios_minimum_os=10.2  --ios_multi_cpus=i386,x86_64
ERROR: file 'tests/ios/app/_objs/OnlySources_objc/arc/OnlySources.o' is generated by these conflicting actions:
Label: //tests/ios/app:OnlySources_objc
RuleClass: objc_library rule
Configuration: cbe9f9128c0d84741485fbbdcf191f7fb188abe6501fd879b855daa84346ecf6, 4fa98f0e6e62218748f252ceda045824522286926b99978a6209345974b7a871
Mnemonic: ObjcCompile
Action key: 798966fd4a85d658616d1369ac7cecf95af97d72654776cdfe3b1b02d1cde402
Progress message: Compiling tests/ios/app/OnlySources/OnlySources.m
PrimaryInput: File:[/Users/jmarino/Development/rules_ios[source]]tests/ios/app/OnlySources/OnlySources.m
PrimaryOutput: File:[[<execution_root>]bazel-out/applebin_ios-ios_i386-dbg-ST-e4791b898f40/bin]tests/ios/app/_objs/OnlySources_objc/arc/OnlySources.o
Owner information: ConfiguredTargetKey{label=//tests/ios/app:OnlySources_objc, config=BuildConfigurationValue.Key[cbe9f9128c0d84741485fbbdcf191f7fb188abe6501fd879b855daa84346ecf6]}, ConfiguredTargetKey{label=//tests/ios/app:OnlySources_objc, config=BuildConfigurationValue.Key[4fa98f0e6e62218748f252ceda045824522286926b99978a6209345974b7a871]}
MandatoryInputs: are equal
Outputs: are equal
ERROR: com.google.devtools.build.lib.skyframe.ArtifactConflictFinder$ConflictException: com.google.devtools.build.lib.actions.MutableActionGraph$ActionConflictException: for tests/ios/app/_objs/OnlySources_objc/arc/OnlySources.o, previous action: action 'Compiling tests/ios/app/OnlySources/OnlySources.m', attempted action: action 'Compiling tests/ios/app/OnlySources/OnlySources.m'
INFO: Elapsed time: 0.062s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)

Documentation on how to best consume existing xcconfig files using fetch_default_xcconfig?

Hello There,

Thanks for this wonderful ruleset, I am excited to see a very large application successfully using these rules to build ๐Ÿ˜„ . I have a question about how to consume existing xcconfig files. I see in the documentation references to default_xcconfig_name and fetch_default_xcconfig, I have set default_xcconfig_name and I am now told to implement fetch_default_xcconfig, is there an example of this I can refer to? Thanks!

Errors when setting xcconfigs: SWIFT_DEPLOYMENT_TARGET, SWIFT_PLATFORM_TARGET_PREFIX

I've got an Xcode project which sets a custom XCConfig for SWIFT_DEPLOYMENT_TARGET. Under rules_ios when I set:

apple_framework(name=, xcconfig = { "SWIFT_DEPLOYMENT_TARGET": "11.0" })

It tries to override the target to -target -apple-11.0 and errors, where in Xcode I'd get -target x86_64-apple-ios11.0-simulator

Currently the xcconfig evaluator doesn't take into account platform, so many xcconfig settings aren't evaluated to the same result in Xcode. Here's a reference to the xcconfig line https://github.com/bazel-ios/rules_ios/blob/master/data/xcspec_evals.bzl#L3642

Evaluate reducing compiler file system reads by reducing search paths

When looking at rules_ios, I noticed that there are a significant number of search paths passed into the compiler. It seems to be O(N) transitive dependencies.

If the compiler needs to hit these search paths for each job, there will be a O( M search paths X N imports ) performance hit on I/O: specifically it will do a lot more reads than it should. The classic fix for this, which PodToBUILD uses is to pass a single search path to a headermap which has O(1) lookups. This is just something I noticed when looking at rules_ios and haven't tested it out in depth.

Header for swift is generated for unknown reason

For some reason a non existed (supposedly autogenerated)Single_Application_UnitTests-Swift.h file is added to xcodeproj after bazel run.
See discussion here for more details: #45 (comment)
This has no impact to tests or build but will be good to figure out why in future once we have more knowledge about how it is being generated (the reference) in first place.

Error when passing resources argument to ios_unit_test

We pass the resources keyword argument from the rules_ios ios_unit_test macro directly to the swift_library rule vended by bazelbuild/rules_swift as well as to Bazel's native objc_library rule. Neither of the signatures of these library rule functions allow an argument named resources.

[xcodeproj] Post build script fails if `include_transitive_targets` is set to True

Following PR #105:
if we have this where include_transitive_targets is set to True, post build check on this project will fail

xcodeproj(
    name = "Test-Imports-App-Project",
    testonly = True,
    bazel_path = "bazelisk",
    include_transitive_targets = True,
    deps = [
        "//tests/ios/unit-test/test-imports-app:TestImports-App",
        "//tests/ios/unit-test/test-imports-app:TestImports-App_framework_unlinked",
        "//tests/ios/unit-test/test-imports-app:TestImports-Unit-Tests",
    ],
)

Not a regression as this uncovers an existing issue

[xcodeproj] swift_copts not propagated into project

I've noticed that some attributes of rules including the flag swift_copts isn't propagated into the Xcode proj:

 40 apple_framework(
 41     name = "SwiftLib",
 42     srcs = glob(["Swift/*"]),
 43     platforms = {"ios": "10.0"},
 44     swift_copts = ["-DSOME_THING_REQUIRED"],
 45     swift_version = "5.1",
 46     visibility = ["//visibility:public"],
 47 )

This one can cause problems - for instance a .swift file may require a define -DSOME_THING_REQUIRED in order to compile

FrameworkA-Swift.h: fatal error: module 'ThirdParty' not found (when @import inside autogenerated swift header file)

Hey guys,

First of all, thanks for this repo, looks very promising!

I have a problem I am not able to solve, maybe you have an idea of what is going on. I have something like the following (this is a bit simplified, but will do for now):

apple_dynamic_framework_import(ThirdParty) -> This is a prebuilt swift framework with objc support
  |
swift_library(LibA) -> This includes swift code
  |
apple_framework(FrameworkA) -> This is a framework with mixed swift and objc

When building FrameworkA (with the latest from master from this repo) I get the following error:

In file included from Path/to/FrameworkA/somefile.m:7:
./bazel-out/apl-ios_x86_64-dbg/bin/Path/to/FrameworkA-Swift.h:186:9: fatal error: module 'ThirdParty' not found
@import ThirdParty;
 ~~~~~~~^~~~~~~~~
1 error generated.

I have been trying to reproduce it with the mixed-source example you provide and replicating the hierarchy I mentioned here, but couldn't: in all my trials the exampled built successfully. I realized that in this case the generated FrameworkA-Swift.h file does not contain @import ThirdParty;.

So, why is it then that when I build my framework I end up finding @import ThirdParty; inside FrameworkA-Swift.h?

The closes I have come to troubleshooting the issue sounds like https://bugs.swift.org/browse/SR-7051 and https://paul-samuels.com/blog/2018/01/14/swift-static-library-in-objective-c/, where they mention a very similar problem. The author solves it here.

Despite reading the linked blogs, I am out of ideas about how to approach this at the moment. Any help would be super welcome.

Thanks :)

Allow using xcodeproj rule with upstream rules_apple and rules_swift

Hello!

We would like to start using the xcodeproj rule and all the work that the community has been doing, but we already have a substantial amount of targets running on some internal macros around objc_library and swift_library. As far as I can see, the rationale behind enforcing the usage of apple_framework_packaging/apple_framework is to offer a single rule for packaging and using it as a dependency, along with some patches to the official rules that provide a nicer experience.

I think more projects would be able to adopt the common xcodeproj if they didn't have to maintain a separate version (or completely switch over) to rules_ios for building their code. I'm wondering if there's a way to provide a separate aspect that would allow the xcodeproj rule to work with the upstream rules if a consumer chooses to do so.

I've heard that some other people would also be interested in this feature, so I think laying out a plan (if it's even possible) would allow the community to help deliver this feature.

Sporadic issue with duplicate Enums/Classes/etc in remote cached CI builds

Hello there,

First and foremost thank you for this wonderful library! I am running into an intermittent issue in my CI builds (I cannot reproduce this locally) where I am getting duplicate Enums/Class errors like so:

08:52:54 /private/var/tmp/_bazel_ios-node-2/c567ed985a5d3e1ea0400bb5101861f6/execroot/__main__/./Projects/SomeApp/SomeApp/APPLog.h:12:36: error: redefinition of 'APPLogLevel'
08:52:54 typedef NS_CLOSED_ENUM(NSUInteger, APPLogLevel) {
08:52:54                                    ^
08:52:54 /private/var/tmp/_bazel_ios-node-2/c567ed985a5d3e1ea0400bb5101861f6/execroot/__main__/bazel-out/ios-x86_64-min11.0-applebin_ios-ios_x86_64-fastbuild-ST-c928d317f2e9/bin/Projects/SomeApp/SomeAppApp_framework_unlinked/SomeApp.framework/Headers/APPLog.h:12:36: note: previous definition is here
08:52:54 typedef NS_CLOSED_ENUM(NSUInteger, APPLogLevel) {

Is there some kind of suggested setting for remote cached CI builds to use to prevent this kind of errors? Thanks

[xcodeproj] index-import <-> bazel resource contention

Good afternoon! I noticed on a larger Bazel project, that there's some contention with index-import and bazel. It looks like this program is processing several GB of data taking 10-20 minutes after a large incremental build.

Perhaps it'd be nice to have an option to disable index-import in rules_ios, or let the user add this feature. In the current form it takes longer to import indexs than for xcode to build them on-demand.

Project .bazelrc options

It might be worth testing out disabling swift.index_while_building ( and system module indexing ) and moving to a global index in rules_swift. index-import would probably need to be reconfigured

 --features=swift.index_while_building

Additionally I have noticed that the build turns down the QOS of Bazel:

startup --macos_qos_class=utility

Perhaps a factor in the resource contention, if index-import is getting preferential scheduling over Bazel sub-processes like clang and swift

[xcodeproj] Unable to run test targets as part of a non-test scheme

Schemes that primarily build an application or framework (i.e. "application" or "framework.static") often run tests associated with those targets.

It would be great to be able to associate a non-test target with 1 or multiple test targets, so that if a developer runs test from a non-test scheme, those test targets would be run.

For example:

If I generate the "Single Static Framework Project"

bazel run //tests/ios/xcodeproj:Single-Static-Framework-Project

I would expect the "ObjcFramework" scheme to include "ObjcFrameworkTests" tests in its test list.

CleanShot 2021-05-12 at 12 04 22@2x

Error when import <ModuleName/ModuleName-Swift.h>

Hi, thanks for sharing useful custom rules. I'm using apple_framework for mixed Objective-C and Swift. It works fine when I use Objective-C classes in my Swift files, using umbrella header imports.

But when I tried to use Swift class in my Objective-C files the build is failed.

In the Objective-C file, I import the generated Swift header as below (my module name is MixecObjcSwift):
#import <MixedObjcSwift/MixedObjcSwift-Swift.h>

Error: src/MixedObjcSwift/PrintService.m:9:9: fatal error: 'MixedObjcSwift/MixedObjcSwift-Swift.h' file not found

Could you please assist me this issue? I created a demo of this here: https://github.com/vincephamgrab/demo-mixedobjcswift

[xcodeproj] xcode_proj handling of bazel artifacts

I've noticed a the xcode_project rule is pointing at bazel-out for a few artifacts. For example HEADER_SEARCH_PATHS. This might cause some issues in the case where the files don't exist: cleaning in Xcode, opening Xcode prior to building. Additionally it will cause issues if those files are outputs of a simulator build and the user is never using a simulator. In that case, the indexer and autocomplete will not work.

For what it's worth, XCHammer does a few things to get around this - manage generated files relevant to indexing and building on it's own and in some cases building them up front.

Xcodebuild command can not launch test on device/simulator

I was having this problem many times in the CI, but now I started running the bazel locally too, it only happens when I run the tests, and these certain tests need the simulator to run

I was thinking that it could be something about the processing on top of the machine, I did some tests limiting the number of jobs I had on the tests, but still giving the same thing.

Note: I am running several tests at the same time, and a command that runs the tests of all modules in the project. Does anyone have any idea what they can help solve?

FAIL: //Modules/Core:CoreTests (see /private/var/tmp/_bazel_lucasromano/6ae06e63d3f59df6a568ce87d763d2c7/execroot/__main__/bazel-out/darwin-dbg/testlogs/Modules/Core/CoreTests/test.log)
INFO: From Testing //Modules/Core:CoreTests:
==================== Test output for //Modules/Core:CoreTests:
2021-04-06 04:56:36,286 Will consider the test as test type xctest to run.
2021-04-06 04:56:36,291 Generating xctestrun file.
2021-04-06 04:56:39,458 Failed to import biplist module. Will use tool /usr/libexec/PlistBuddy to handle the binary format plist.
2021-04-06 04:56:40,276 Failed to import biplist module. Will use tool /usr/libexec/PlistBuddy to handle the binary format plist.
2021-04-06 04:56:40,774 Failed to import biplist module. Will use tool /usr/libexec/PlistBuddy to handle the binary format plist.
2021-04-06 04:56:40,783 Creating a new simulator:
Name: New-iPhone 12 Pro Max-14.4
OS: iOS 14.4
Type: iPhone 12 Pro Max
2021-04-06 04:56:42,161 Created new simulator EA08A20B-0DB7-4653-8079-84C2A98A45EF.
2021-04-06 04:56:42,162 Running test-without-building with device EA08A20B-0DB7-4653-8079-84C2A98A45EF
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild test-without-building -xctestrun /var/folders/12/t1f_q1cn2p7dq0v9xvlmx7hm0000gn/T/test_runner_work_dir.VkgZsW/TEST_ROOT/xctestrun.plist -destination id=EA08A20B-0DB7-4653-8079-84C2A98A45EF -derivedDataPath /private/var/tmp/_bazel_lucasromano/6ae06e63d3f59df6a568ce87d763d2c7/execroot/__main__/bazel-out/darwin-dbg/testlogs/Modules/Core/CoreTests/test.outputs -resultBundlePath /private/var/tmp/_bazel_lucasromano/6ae06e63d3f59df6a568ce87d763d2c7/execroot/__main__/bazel-out/darwin-dbg/testlogs/Modules/Core/CoreTests/test.outputs/test.xcresult

User defaults from command line:
    IDEBuildOperationResultBundlePath = /private/var/tmp/_bazel_lucasromano/6ae06e63d3f59df6a568ce87d763d2c7/execroot/__main__/bazel-out/darwin-dbg/testlogs/Modules/Core/CoreTests/test.outputs/test.xcresult
    IDEDerivedDataPathOverride = /var/tmp/_bazel_lucasromano/6ae06e63d3f59df6a568ce87d763d2c7/execroot/__main__/bazel-out/darwin-dbg/testlogs/Modules/Core/CoreTests/test.outputs
    IDETestRunSpecificationPath = /var/folders/12/t1f_q1cn2p7dq0v9xvlmx7hm0000gn/T/test_runner_work_dir.VkgZsW/TEST_ROOT/xctestrun.plist

Writing result bundle at path:
	/private/var/tmp/_bazel_lucasromano/6ae06e63d3f59df6a568ce87d763d2c7/execroot/__main__/bazel-out/darwin-dbg/testlogs/Modules/Core/CoreTests/test.outputs/test.xcresult

Testing started
2021-04-06 04:56:48.622 xcodebuild[23230:3304179]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/var/tmp/_bazel_lucasromano/6ae06e63d3f59df6a568ce87d763d2c7/execroot/__main__/bazel-out/darwin-dbg/testlogs/Modules/Core/CoreTests/test.outputs/test.xcresult/Staging/1_Test/Diagnostics/CoreTests-2BAC9DC9-836C-45E6-AD79-61A096F8E6A3/CoreTests-3AEDF200-7F64-4C85-9596-C2A510C0B5F3/Session-CoreTests-2021-04-06_045648-2ZyJ1O.log
2021-04-06 04:56:48.624 xcodebuild[23230:3303950] [MT] IDETestOperationsObserverDebug: (24BD3FD9-16F6-4D20-B01F-449316436AEB) Beginning test session CoreTests-24BD3FD9-16F6-4D20-B01F-449316436AEB at 2021-04-06 04:56:48.624 with Xcode 12D4e on target <DVTiPhoneSimulator: 0x7f859bf76cf0> {
		SimDevice: New-iPhone 12 Pro Max-14.4 (EA08A20B-0DB7-4653-8079-84C2A98A45EF, iOS 14.4, Shutdown)
} (14.4 (18D46))
2021-04-06 04:59:12,395 The xcodebuild command got stuck and has not started test in 150. Will kill the command directly.
2021-04-06 04:59:12.899 xcodebuild[23230:3303950] [MT] IDETestOperationsObserverDebug: (24BD3FD9-16F6-4D20-B01F-449316436AEB) Failed to make test runner session:
Error Domain=DTXProxyChannel Code=1 "(null)" UserInfo={DTXProxyChannelErrorMessage=Channel disconnected}


*** If you believe this error represents a bug, please attach the result bundle at /var/tmp/_bazel_lucasromano/6ae06e63d3f59df6a568ce87d763d2c7/execroot/__main__/bazel-out/darwin-dbg/testlogs/Modules/Core/CoreTests/test.outputs/test.xcresult

** BUILD INTERRUPTED **
2021-04-06 04:59:18,977 xcodebuild command can not launch test on device/simulator in 150s.
error: Info.plist at /private/var/tmp/_bazel_lucasromano/6ae06e63d3f59df6a568ce87d763d2c7/execroot/__main__/bazel-out/darwin-dbg/testlogs/Modules/Core/CoreTests/test.outputs/test.xcresult/Info.plist does not exist, the result bundle might be corrupted or the provided path is not a result bundle
2021-04-06 04:59:19,758
2021-04-06 04:59:19,760 Deleting simulator EA08A20B-0DB7-4653-8079-84C2A98A45EF asynchronously.
2021-04-06 04:59:19,776 Done.

Xcode: 12.4
OS: Bir Sur 11.2.3

Error "this class is not key value coding-compliant for the key" when using XIBs inside resource bundles

Hi:

I have been trying to debug this issue, but with little success.

What I did:

  1. Take the example tests/ios/frameworks/target-xib from this repository and copy it to tests/ios/frameworks/target-xib-resource-bundle
  2. Modify the BUILD.bazel file to use a resource bundle
  3. Update the source code to point to the right resource bundle when reading the XIB

When running the test from the example, the resource bundle is found, and the XIB is also found. But after that I am getting the error: <unknown>:0: error: -[TargetXIBTestsLib.CustomViewTests testCustomView] : failed: caught "NSUnknownKeyException", "[<UIView 0x7f8d9fc6de50> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key label."

Find the code with the failing test here: #112
To try it out, just run git clone https://github.com/acecilia/rules_ios.git -b customModuleProviderBug && cd rules_ios && bazelisk test --apple_platform_type=ios //tests/ios/frameworks/target-xib-resource-bundle:TargetXIBTests

Thanks :)

Test / mitigate costly module recompilation: inheritance of OS version

Add the ability to inherit the OS version from the top level application down the tree. By default it'd be ideal to set the OS version for a single build. There are a few reasons this is useful.

  1. performance. As modules are cached with respect to OS version, I get O(N OS versions) module rebuilds. see lower
  2. deprecations. If I'm staticlaly linking some code into my app I'd like the compiler to alert me if it's using a deprecated or missing API

It seems like pt 1. might be marginal, however, when scaling to thousands of includes and many OS versions it is costly. Consider the build

swift_lib a - deps [b], os version 10
swift_lib b - deps [c], os version 9
swift_lib c - deps [d], os version 8
swift_lib d -deps [e] , os version 7
swift_lib e, os version 6

At each step of the build we need to reparse and recompile modules for all transitive imports because the modules for the previous step aren't reused. For specific use cases this is a non trivial cost, depending on how expensive it is to compile a PCM

Commentary for expected behavior of "multi platform" apple frameworks

I have encountered the following test case:

bazel build -s tests/framework/platforms/framework_deps_macos_101000_ios_100000_tvos_100000_watchos_30200

This is created at the file:
https://github.com/bazel-ios/rules_ios/blob/master/tests/framework/platforms/versions.bzl#L68

It wasn't clear what the expected behavior of Bazel is in this use case or what it's testing. I'd be useful to have a comment on this line of code to clarify what the intention of the build is.

Build apple_framework for device does not generate arm modules

I am a noob as far as ios as well as using bazel for building ios targets. I am trying to build an apple_framework target for ios. I am using this demo repo https://github.com/vincephamgrab/demo-mixedobjcswift (borrowed from vince's example for mixedobjcswift).

When I build it as follows

bazel build //src:MixedObjcSwift  --ios_multi_cpus=armv7,arm64,x86_64

I still only see the x86_64.swiftmodule and do not see anything for arm.

Any help/suggestions is appreciated.

Thanks

Screen Shot 2020-04-22 at 3 50 57 AM

Update to Bazel 4.0.0 and latest releases of rules_apple, rules_swift, and apple_support

I've started to attempt this, and I've encountered a few issues:

  • This project depends on a fork of rules_swift, that fork will need to be updated too: https://github.com/bazel-ios/rules_swift/tree/rules_ios/HEAD
  • precompiled_apple_resource_bundle.bzl uses some internal rules_apple APIs, it will need to be updated. Keith shared his version here, which I imagine can be mostly copied, but does need some additional changes.

[xcodeproj] Scheme list under xcode has lots of "stale" schemes left from last project

step to reproduce:
generate a .xcodeproj with name abc using xcodeproj rule
generate a the same same .xcodeproj with an entirely different set of targets and schemes

expect result:
scheme list only contains the new set of schemes generated in the second run
actual result:
scheme list will have old schemes showing up that is not useful

root cause: this is probably because of the stale scheme list left over from previous xcode proj
further investigation needed to confirm the root cause and exact behaviour

Add support for swift's .swiftinterface

Add the ability to handle .swiftinterface in rules_ios. swiftinterface potentially improves incremental build perf by reducing the size of incremental builds and potentially increases concurrency. Currently this feature requires library evolution but has already been added in rules_swift.

ios_unit_test doesn't support flaky=True

Was surprised to find this issue when marking an ios_unit_test as flaky.

At a glance this is due to the flaky kwarg passing through into the library rules which don't support it, because it's not in the list of test args (_IOS_TEST_KWARGS) that are popped; this is a trivial fix which I'll send a patch for, but I was curious if there's some issue at play here, since this one seems likely to have been caught by now.

Index while building V2 - remote cache objc index stores

The native rules currently don't have an specify indexstore as a clang compilation action output. It may use rules_cc compilation actions to write to a global index internally and then copy the updated units+records to an output directory to ensure remote caching will work. Here, it uses rules_cc to add an extra compilation output for the translation unit / source file.

@rules_cc : Cycle in the workspace file detected. This indicates that a repository is used prior to being defined.

Hello, I wanted to try your rules in my repo, but I get errors.

WORKSPACE

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

git_repository(
    name = "build_bazel_rules_ios",
    remote = "https://github.com/ob/rules_ios.git",
    branch = "master",
)

load(
    "@build_bazel_rules_ios//rules:app.bzl",
    "rules_ios_dependencies"
)

rules_ios_dependencies()

load(
    "@build_bazel_rules_apple//apple:repositories.bzl",
    "apple_rules_dependencies",
)

apple_rules_dependencies()

load(
    "@build_bazel_rules_swift//swift:repositories.bzl",
    "swift_rules_dependencies",
)

swift_rules_dependencies()

load(
    "@build_bazel_apple_support//lib:repositories.bzl",
    "apple_support_dependencies",
)

apple_support_dependencies()

Results

โžœ  rule_ios bazel build
WARNING: Usage: bazel build <options> <targets>.
Invoke `bazel help build` for full description of usage and options.
Your request is correct, but requested an empty set of targets. Nothing will be built.
ERROR: Failed to load Starlark extension '@rules_cc//cc:defs.bzl'.
Cycle in the workspace file detected. This indicates that a repository is used prior to being defined.
The following chain of repository dependencies lead to the missing definition.
 - @rules_cc
This could either mean you have to add the '@rules_cc' repository with a statement like `http_archive` in your WORKSPACE file (note that transitive dependencies are not added automatically), or move an existing definition earlier in your WORKSPACE file.
ERROR: cycles detected during target parsing
INFO: Elapsed time: 0.185s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)

Example on how to test apple_library inside of an ios_application rule

Hello there,

I am looking to run tests against a ios_application target defined like so:

ios_application(
    name = "SomeApp",
    swift_objc_bridging_header = "SomeApp-Bridging-Header.h",
    srcs = glob(["**/*.m", "**/*.h", "**/*.swift"]),
    bundle_id = "com.app.SomeApp",
    minimum_os_version = "11.0",
    resources = [
        "//Projects/SomeApp:SomeAppAssets"
    ],
    entitlements = "//Projects/SomeApp:SomeAppEntitlements",
    infoplists = [
        ":SomeAppPlist"
    ],
    deps = [
        "ManyDeps"
    ]
)

How can I run tests against the underlying apple_library target in this rule? I would rather not use apple_framework here given no-one should ever import SomeApp.

[perf] mitigate rules_apple re-bundling

Rules apple constantly re - "bundles" the app, when an input changes. This adds considerable overhead when compared to Xcode for small builds.

Devise a strategy to mitigate this in rules_ios

Duplicate modulemaps

I have BUILD file for Tests.

load("@build_bazel_rules_ios//rules:framework.bzl", "apple_framework")
load("@build_bazel_rules_ios//rules:library.bzl", "apple_library")
load("@build_bazel_rules_ios//rules:test.bzl", "ios_unit_test")
load("@build_bazel_rules_apple//apple:ios.bzl", original_ios_unit_test = "ios_unit_test")
apple_framework(
    name = "TVLFoundation",
    module_name = "TVLFoundation",
    srcs = glob([
        "TVLFoundation/**/*.m",
        "TVLFoundation/**/*.swift"
    ]),
    public_headers = glob(["TVLFoundation/**/*.h"]),
    sdk_frameworks = [
        "Foundation",
    ],
    deps = [
        "//Pods/Bolts:Bolts",
        "//Pods/DateTools:DateTools",
        "//Pods/PINCache:PINCache",
        "//Pods/SAMKeychain:SAMKeychain"
    ],
    swift_version = "5.1",
    weak_sdk_frameworks = [
        "AdSupport",
        "CoreGraphics"
    ],
    visibility = ["//visibility:public"]
)
apple_framework(
    name = "TVLFoundationTestLib",
    module_name = "TVLFoundationTestLib",
    srcs = glob([
        "TVLFoundationTests/*.m",
        "TVLFoundationTests/*.swift"
    ]),
    pch = "TVLFoundationTests/TVLFoundationTests-prefix.pch",
    deps = [
        ":TVLFoundation",
        "//Pods/Expecta:Expecta",
        "//Pods/OCMock:OCMock",
        "//Pods/Specta:Specta",
    ]
)
ios_unit_test(
    name = "TVLFoundationTests",
    minimum_os_version = "11.0",
    deps = [
        ":TVLFoundationTestLib",
    ]
)

Error message:

ERROR: /Users/albertjanuar/Documents/traveloka/district-traveloka/packages/apps/ios/Traveloka/Modules/TVLFoundation/BUILD:6:1: Compiling Swift module TVLFoundation failed (Exit 1): worker failed: error executing command
  (cd /private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__ && \
  exec env - \
    APPLE_SDK_PLATFORM=iPhoneSimulator \
    APPLE_SDK_VERSION_OVERRIDE=13.4 \
    XCODE_VERSION_OVERRIDE=11.4.0.11E146 \
  bazel-out/host/bin/external/build_bazel_rules_swift/tools/worker/worker swiftc @bazel-out/apl-ios_x86_64-fastbuild/bin/Modules/TVLFoundation/TVLFoundation.swiftmodule-0.params)
Execution platform: @local_config_platform//:host
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/Bolts/Bolts/Bolts.framework/Modules/module.modulemap:1:18: error: redefinition of module 'Bolts'
framework module Bolts {
                 ^
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/Bolts/Bolts-modulemap/Bolts.modulemap:1:18: note: previously defined here
framework module Bolts {
                 ^
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/DateTools/DateTools/DateTools.framework/Modules/module.modulemap:1:18: error: redefinition of module 'DateTools'
framework module DateTools {
                 ^
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/DateTools/DateTools-modulemap/DateTools.modulemap:1:18: note: previously defined here
framework module DateTools {
                 ^
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/PINOperation/PINOperation/PINOperation.framework/Modules/module.modulemap:1:18: error: redefinition of module 'PINOperation'
framework module PINOperation {
                 ^
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/PINOperation/PINOperation-modulemap/PINOperation.modulemap:1:18: note: previously defined here
framework module PINOperation {
                 ^
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/PINCache/PINCache/PINCache.framework/Modules/module.modulemap:1:18: error: redefinition of module 'PINCache'
framework module PINCache {
                 ^
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/PINCache/PINCache-modulemap/PINCache.modulemap:1:18: note: previously defined here
framework module PINCache {
                 ^
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/SAMKeychain/SAMKeychain/SAMKeychain.framework/Modules/module.modulemap:1:18: error: redefinition of module 'SAMKeychain'
framework module SAMKeychain {
                 ^
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/SAMKeychain/SAMKeychain-modulemap/SAMKeychain.modulemap:1:18: note: previously defined here
framework module SAMKeychain {
                 ^
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/Bolts/Bolts/Bolts.framework/Modules/module.modulemap:1:18: error: redefinition of module 'Bolts'
framework module Bolts {
                 ^
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/Bolts/Bolts-modulemap/Bolts.modulemap:1:18: note: previously defined here
framework module Bolts {
                 ^
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/DateTools/DateTools/DateTools.framework/Modules/module.modulemap:1:18: error: redefinition of module 'DateTools'
framework module DateTools {
                 ^
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/DateTools/DateTools-modulemap/DateTools.modulemap:1:18: note: previously defined here
framework module DateTools {
                 ^
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/PINOperation/PINOperation/PINOperation.framework/Modules/module.modulemap:1:18: error: redefinition of module 'PINOperation'
framework module PINOperation {
                 ^
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/PINOperation/PINOperation-modulemap/PINOperation.modulemap:1:18: note: previously defined here
framework module PINOperation {
                 ^
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/PINCache/PINCache/PINCache.framework/Modules/module.modulemap:1:18: error: redefinition of module 'PINCache'
framework module PINCache {
                 ^
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/PINCache/PINCache-modulemap/PINCache.modulemap:1:18: note: previously defined here
framework module PINCache {
                 ^
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/SAMKeychain/SAMKeychain/SAMKeychain.framework/Modules/module.modulemap:1:18: error: redefinition of module 'SAMKeychain'
framework module SAMKeychain {
                 ^
/private/var/tmp/_bazel_albertjanuar/1bb2f1cdc0f2f1db513e99c8b044778c/execroot/__main__/bazel-out/apl-ios_x86_64-fastbuild/bin/Pods/SAMKeychain/SAMKeychain-modulemap/SAMKeychain.modulemap:1:18: note: previously defined here
framework module SAMKeychain {
                 ^
<unknown>:0: error: could not build Objective-C module 'SwiftShims'
Target //Modules/TVLFoundation:TVLFoundation failed to build

All pods are created with apple_framework as well. I got error regarding multiple module maps.

Should I add something to the rule to avoid these?

Thanks!

[xcodeproj] Private header maps are not included as "-iquote" argument during objc file indexing

Comparing how Bazel compile a .m file vesus how xcode indexer compile a .m file, one can see that Bazel has a flag -iquote<path_to_framework_private_hmap> where xcode indexer won't have any flag with -iquote to start with. A proposed change to add this here does not work because Xcode still add the passed in hmap path behind -I not '-iquote'.
Another way to fix is pass as explicit copt but that can have other implications

@objc directive does not work on swift extension

I have a mixed framework where a Objective-C class is extended in swift(@objc) but the Objective-C class does not have visibility to the method. I'm getting error: no visible @interface for 'Objective-C Class' declares the selector 'myMethod'.

I'm using the apple_framework rule.

Any help will be welcome.

apple_library error @import module when mixing with other libraries

Hi! i have 2 scenarios that fails:

Scenario1:

structure:
ModuleA (mixed, objc /swift)
-> depends on ModuleC (pure obc)

bazel build //MixedTest:ModuleA_swift

error: umbrella header 'ModuleC-umbrella.h' not found
umbrella header "ModuleC-umbrella.h"

Scenario2:

structure:
ModuleD (pure swift)
-> depends on ModuleE (pure swift)

bazel build //MixedTest:ModuleD_swift

MixedTest/ModuleD/D.swift:2:8: error: cannot load underlying module for 'ModuleE'
import ModuleE

Fork to reproduce error:
https://github.com/JuanFelippo/rules_ios
branch: feature/mixed

Any ideasss?

[xcodeproj] Local breakpoints do not work when sandbox is enabled

See #98 (comment) for context.

"In order for the example applications and tests in the rules_ios repo to be debuggable from Xcode, you must:

Disable sandboxing in .bazelrc.
Update the flag in the tools/xcodeproj_shims/build-wrapper.sh to refer to --//rules:local_debug_options_enabled rather than --@build_bazel_rules_ios//rules:local_debug_options_enabled"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.