MobileNativeFoundation / MobileNativeFoundation/rules_xcodeproj

Feature Request: collect custom source files

Open
#2,472 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
Swift
Stars
626
Forks
124
PR merge metrics
No merged PRs in 30d

Description

Hello, I'm trying to use kotlin multiplatform recently and I have implemented a rule for compiling kotlin source files into static_framework so they can be integrated into iOS ecosystem.
This is my current implementation of pseudocode.

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

# Macro
def kt_native_ios_static_framework(
        name,
        export_klibs,
        module_name = None,
        **attrs):
    generator_name = name + "_generator"

    _kt_native_ios_static_framework_generator(
        name = generator_name,
        export_klibs = export_klibs,
        module_name = module_name,
    )

    apple_static_framework_import(
        name = name,
        framework_imports = [":{}".format(generator_name)],
        **attrs
    )

I currently have an implementation of a gradle project generator similar to xcodeproj for daily development of Kotlin Multiplatform, but for iOS engineers although Xcode cannot syntax highlighting and code prompts, I still hope to put the source files of kotlin in xcode so that at least breakpoint and print variables can be used when Debug. I read the documentation and it seems that there is no particularly suitable place for me to aspect all dependencies to find the corresponding kotlin source code and put it in the xcode project as extra files. Is there any suggestions for this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the apple.bzl integration and the apple_static_framework_import macro shown in the report, then trace how the Gradle project generator and generated Xcode project handle framework dependencies. Clarify how dependent Kotlin source files should be discovered and represented as extra files; done means those sources appear in Xcode and support the requested breakpoint and variable-print debugging workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, kotlin
Domain
build-system, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.