microsoft / microsoft/fluentui-apple

FluentUI cannot be used in pod subspecs with multiple targets in a single Xcode project

Open
#602 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
977
Forks
180
Avg merge
21h 38m
Merged PRs (30d)
1

Description

Environment Information
  • Platform:
    • iOS
    • macOS
  • Package version(s): CocoaPods 0.2.7
  • Xcode and OS versions: Xcode 12.5
Please provide a reproduction of the bug:
  1. Create an Xcode project, add an additional target to the project
  2. pod init, and use subspec to add dependencies to each targets, for example
target 'FluentUIBuildingIssue' do
  use_frameworks!
  pod 'MicrosoftFluentUI/Shimmer_ios', '~> 0.2.5'
  pod 'MicrosoftFluentUI/ActivityIndicator_ios', '~> 0.2.5'
end

target 'FluentUIBuildingIssueTarget2' do
  use_frameworks!
  pod 'MicrosoftFluentUI/HUD_ios', '~> 0.2.5'
end
  1. pod install and try to build a target
Actual behavior:
xcodebuild: error: The project '****/FluentUIBuildingIssue/Pods/Pods.xcodeproj' does not contain a target named 'MicrosoftFluentUI-FluentUIResources-ios'.

CocoaPods created separate targets in the Pods.xcodeproj, the script in [CP-User] Optimize resource bundle does not match MicrosoftFluentUI-FluentUIResources-ios.

Screen Shot 2021-06-10 at 3 30 33 PM
Expected behavior:

It should build fine.

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 two-target Podfile, run pod install, and inspect Pods/Pods.xcodeproj plus the [CP-User] Optimize resource bundle script. Done means xcodebuild builds both iOS targets without the missing MicrosoftFluentUI-FluentUIResources-ios target error.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.