Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error "Carbon is not available when building for iOS Simulator" #73

Open
2 of 3 tasks
nonameplum opened this issue Mar 27, 2020 · 15 comments
Open
2 of 3 tasks

Comments

@nonameplum
Copy link

Checklist

Expected Behavior

The example application compiles without the error message

Current Behavior

~/Carbon/Examples/Example-iOS/Example-iOS.xcodeproj Carbon is not available when building for iOS Simulator.

Steps to Reproduce

Install Xcode 11.4
Follow the steps to run the example app from the README.

Reproducible Demo Project

The as is Example app from the Carbon repository.

Environments

I was thinking that this is related to CocoaPods only but seems like the Example app from the Carbon that is not using CocoaPods to resolve dependencies has the same issue in Xcode 11.4.

@bofeizhu
Copy link

bofeizhu commented Mar 27, 2020

I think there is a name conflict with macOS's Carbon framework. The only solution might be renaming the framework to something else.

@ra1028
Copy link
Owner

ra1028 commented Mar 31, 2020

@nonameplum

Thanks for your reporting.

I fixed this problem by here.
Please check it with the master branch.

@nonameplum
Copy link
Author

@ra1028 Yes, the issue is fixed in the example app but I'm not sure how this can be fixed with cocoapods. Any thoughts?

CocoaPods/CocoaPods#9650

@bofeizhu
Copy link

bofeizhu commented Apr 1, 2020

@nonameplum @ra1028 I think we probably have to rename Carbon to something else to fix the CocoaPods issue. You can see my comment above.

@nonameplum
Copy link
Author

@bofeizhu You are correct. After the framework rename problem is solved.

@ra1028
Copy link
Owner

ra1028 commented Apr 12, 2020

@bofeizhu @nonameplum

I created a sample project and tried to install Carbon with CocoaPods and it worked, can you tell me more about the error?

Anyway, changing the framework name is too big a breaking change.
I think it's a bug depends on Xcode11.4.0 or CocoaPods, as there are no problems with Carthage.
I was disappointed in the overly throwaway response of the CocoaPods maintainers.
I think that should be pursued more on the CocoaPods side.

The workaround you can do now is to rewrite the framework name in the CocoaPods post-install script, or use Carthage.

@bofeizhu
Copy link

@ra1028 The issue only happens when Carbon is used as a dependency in another pod. To reproduce, you can create a development pod and add Carbon as a dependency in its podspec. Then install the development pod to a project, the error would occur. I agree changing the name is too big at this point. But considering Apple could potentially ban the use of Carbon (their old 32-bit UI framework) entirely by filtering out frameworks by name in the future, it may still worth the hassle now. Maybe some subtle change like CarbonX? CarbonKit?

@Goktug
Copy link

Goktug commented Apr 20, 2020

Same problem +1

@lnfnunes
Copy link

I just discovered this lib and thinking to suggest the adoption in my company's project, wondering if this could be a problem since we use Cocoapods in the main project and on the frameworks (modules) as well!? 💭

@nonameplum
Copy link
Author

nonameplum commented Apr 26, 2020

@lnfnunes If you would like to use this framework in one of your frameworks then you will get this issue.

@lnfnunes
Copy link

Hum ok! 😞
Thanks @nonameplum

@Goktug
Copy link

Goktug commented Apr 27, 2020

@bofeizhu @nonameplum

I created a sample project and tried to install Carbon with CocoaPods and it worked, can you tell me more about the error?

Anyway, changing the framework name is too big a breaking change.
I think it's a bug depends on Xcode11.4.0 or CocoaPods, as there are no problems with Carthage.
I was disappointed in the overly throwaway response of the CocoaPods maintainers.
I think that should be pursued more on the CocoaPods side.

The workaround you can do now is to rewrite the framework name in the CocoaPods post-install script, or use Carthage.

@ra1028 Please, reconsider for renaming pod name. Currently, the pod is release candidate, before releasing a stable version of it, you can change the name. Maybe, it can be causing more problems to be used the Apple library name in the future.

@ra1028
Copy link
Owner

ra1028 commented Jun 9, 2020

What hesitates me is that, as mentioned here, it's a failure that only occurs with the limited conditions, and there are many solutions that users can do.
In my opinion, the correct decision is to keep the Carbon side of the equation as it is now, and the user should do workaround only when failing on the edge case.

@bofeizhu
Copy link

bofeizhu commented Jun 9, 2020

@ra1028 I think the same error would happen to any Mac-Catalyst projects using CocoaPods. It will not be a limited condition when Catalyst getting popular in the future.

@ra1028
Copy link
Owner

ra1028 commented Jun 10, 2020

@bofeizhu

same error would happen to any Mac-Catalyst projects

Have you actually faced this phenomenon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants