NativeScript / NativeScript/nativescript-cli

TNSNativeSource gets duplicated in Xcode projects

Open
#5,765 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
1.1k
Forks
204
Avg merge
1d 9h
Merged PRs (30d)
8

Description

Issue Description

Starting with NativeScript v8.6.0, ns prepare ios may duplicate native code section TNSNativeSource in Xcode projects.

In particular, this seems to be related to this PR: https://github.com/NativeScript/nativescript-dev-xcode/pull/15

Reproduction

Download the file to ~/Downloads folder: extra.zip

  1. ns create testApp --js
  2. cd testApp
  3. ns platform add ios
  4. cd App_Resources/iOS
  5. mkdir src
  6. cd src
  7. cp ~/Downloads/extra.zip .
  8. unzip extra.zip
  9. rm extra.zip
  10. cd ../../..
  11. ns prepare ios
  12. touch App_Resources/iOS/src/extra.m
  13. ns prepare ios
  14. open platforms/ios/testApp.xcodeproj
Relevant log output (if applicable)

Screenshot 2023-10-19 at 13 05 10

Environment

No response

Please accept these terms

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

Reproduce the issue with the listed ns prepare ios steps, especially the generated platforms/ios/testApp.xcodeproj and App_Resources/iOS/src/extra.m. Read the related nativescript-dev-xcode pull request and inspect the iOS preparation path that updates the Xcode project. Done means repeated preparation no longer duplicates the TNSNativeSource section.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, javascript
Domain
cli, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.