You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Import failure of CGFloat in LineManager class, causing fastlane build error while compiling WrappingHStack.swift
Steps to reproduce:
Create a new Xcode project.
Add the following code to a file in the project:
import Foundation
enumStage{case child
case boyhood
case adult
case old
varageBar:CGFloat{
switch self{case.child:return 0.2
case.boyhood:return 0.4
case.adult:return 0.8
case.old:return 1.0
}}}
Build and run the project.
Expected result:
The project builds and runs without any errors.
Actual result:
The project fails to build with the following error:
Cannot find type'CGFloat'in scope
Code that causing an issue with respect to WrappingHStack. reference
import Foundation
/// This class is in charge of calculating which items fit on which lines./// It should be reused whenever possible.classLineManager{privatevarcontentManager:ContentManager!privatevarspacing:WrappingHStack.Spacing!privatevarwidth:CGFloat!}
Summary:
Import failure of CGFloat in LineManager class, causing fastlane build error while compiling
WrappingHStack.swift
Steps to reproduce:
Create a new Xcode project.
Add the following code to a file in the project:
Build and run the project.
Expected result:
The project builds and runs without any errors.
Actual result:
The project fails to build with the following error:
Version Details
Notes:
It seems that the import of the Foundation module is not sufficient to use the CGFloat type.
To fix this issue, you can import the CoreGraphics module, which defines the CGFloat type, by adding the following line to the top of the file:
After importing the CoreGraphics module, the CGFloat type should be available and the project should build and run without any errors.
The text was updated successfully, but these errors were encountered: