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

Fonts not generated #859

Open
Bawenang opened this issue Oct 6, 2023 · 1 comment
Open

Fonts not generated #859

Bawenang opened this issue Oct 6, 2023 · 1 comment

Comments

@Bawenang
Copy link

Bawenang commented Oct 6, 2023

I have a project that is developed using XCode 14.3.1. I am using Rswift 7. And based on the recommendation in the readme, I used SPM to implement it. I've done all the steps in the readme. The images, files, etc has been generated. But not the fonts. Here's the screenshot:
Screenshot 2023-10-06 at 15 24 13

And here's the generated R.generated:

//
// This is a generated file, do not edit!
// Generated by R.swift, see https://github.com/mac-cain13/R.swift
//

import Foundation
import RswiftResources
import UIKit

private class BundleFinder {}
let R = _R(bundle: Bundle(for: BundleFinder.self))

struct _R {
  let bundle: Foundation.Bundle
  var color: color { .init(bundle: bundle) }
  var image: image { .init(bundle: bundle) }
  var file: file { .init(bundle: bundle) }
  var nib: nib { .init(bundle: bundle) }
  var storyboard: storyboard { .init(bundle: bundle) }

  func color(bundle: Foundation.Bundle) -> color {
    .init(bundle: bundle)
  }
  func image(bundle: Foundation.Bundle) -> image {
    .init(bundle: bundle)
  }
  func file(bundle: Foundation.Bundle) -> file {
    .init(bundle: bundle)
  }
  func nib(bundle: Foundation.Bundle) -> nib {
    .init(bundle: bundle)
  }
  func storyboard(bundle: Foundation.Bundle) -> storyboard {
    .init(bundle: bundle)
  }
  func validate() throws {
    try self.nib.validate()
    try self.storyboard.validate()
  }


  /// This `_R.color` struct is generated, and contains static references to 13 colors.
  struct color {
    let bundle: Foundation.Bundle

    /// Color `AccentColor`.
    var accentColor: RswiftResources.ColorResource { .init(name: "AccentColor", path: [], bundle: bundle) }

    /// Color `AlertGreen`.
    var alertGreen: RswiftResources.ColorResource { .init(name: "AlertGreen", path: [], bundle: bundle) }

    /// Color `AlertRed`.
    var alertRed: RswiftResources.ColorResource { .init(name: "AlertRed", path: [], bundle: bundle) }

    /// Color `AlertYellow`.
    var alertYellow: RswiftResources.ColorResource { .init(name: "AlertYellow", path: [], bundle: bundle) }

    /// Color `Mono1`.
    var mono1: RswiftResources.ColorResource { .init(name: "Mono1", path: [], bundle: bundle) }

    /// Color `Mono2`.
    var mono2: RswiftResources.ColorResource { .init(name: "Mono2", path: [], bundle: bundle) }

    /// Color `Mono3`.
    var mono3: RswiftResources.ColorResource { .init(name: "Mono3", path: [], bundle: bundle) }

    /// Color `Mono4`.
    var mono4: RswiftResources.ColorResource { .init(name: "Mono4", path: [], bundle: bundle) }

    /// Color `Red1`.
    var red1: RswiftResources.ColorResource { .init(name: "Red1", path: [], bundle: bundle) }

    /// Color `Red2`.
    var red2: RswiftResources.ColorResource { .init(name: "Red2", path: [], bundle: bundle) }

    /// Color `Red3`.
    var red3: RswiftResources.ColorResource { .init(name: "Red3", path: [], bundle: bundle) }

    /// Color `Red4`.
    var red4: RswiftResources.ColorResource { .init(name: "Red4", path: [], bundle: bundle) }

    /// Color `Red5`.
    var red5: RswiftResources.ColorResource { .init(name: "Red5", path: [], bundle: bundle) }
  }

  /// This `_R.image` struct is generated, and contains static references to 3 images.
  struct image {
    let bundle: Foundation.Bundle

    /// Image `Close`.
    var close: RswiftResources.ImageResource { .init(name: "Close", path: [], bundle: bundle, locale: nil, onDemandResourceTags: nil) }

    /// Image `LoginBG`.
    var loginBG: RswiftResources.ImageResource { .init(name: "LoginBG", path: [], bundle: bundle, locale: nil, onDemandResourceTags: nil) }

    /// Image `Logo`.
    var logo: RswiftResources.ImageResource { .init(name: "Logo", path: [], bundle: bundle, locale: nil, onDemandResourceTags: nil) }
  }

  /// This `_R.file` struct is generated, and contains static references to 2 resource files.
  struct file {
    let bundle: Foundation.Bundle

    /// Resource file `Pods_bimb_authenticate_ios.framework`.
    var pods_bimb_authenticate_iosFramework: RswiftResources.FileResource { .init(name: "Pods_bimb_authenticate_ios", pathExtension: "framework", bundle: bundle, locale: LocaleReference.none) }

    /// Resource file `TalsecRuntime.xcframework`.
    var talsecRuntimeXcframework: RswiftResources.FileResource { .init(name: "TalsecRuntime", pathExtension: "xcframework", bundle: bundle, locale: LocaleReference.none) }
  }

  /// This `_R.nib` struct is generated, and contains static references to 3 nibs.
  struct nib {
    let bundle: Foundation.Bundle

    /// Nib `InternetBankingViewController`.
    var internetBankingViewController: RswiftResources.NibReference<UIKit.UIView> { .init(name: "InternetBankingViewController", bundle: bundle) }

    /// Nib `LoginViewController`.
    var loginViewController: RswiftResources.NibReference<UIKit.UIView> { .init(name: "LoginViewController", bundle: bundle) }

    /// Nib `TermsConditionsViewController`.
    var termsConditionsViewController: RswiftResources.NibReference<UIKit.UIView> { .init(name: "TermsConditionsViewController", bundle: bundle) }

    func validate() throws {
      if UIKit.UIImage(named: "Close", in: bundle, compatibleWith: nil) == nil { throw RswiftResources.ValidationError("[R.swift] Image named 'Close' is used in nib 'LoginViewController', but couldn't be loaded.") }
      if UIKit.UIImage(named: "LoginBG", in: bundle, compatibleWith: nil) == nil { throw RswiftResources.ValidationError("[R.swift] Image named 'LoginBG' is used in nib 'LoginViewController', but couldn't be loaded.") }
      if UIKit.UIImage(named: "Logo", in: bundle, compatibleWith: nil) == nil { throw RswiftResources.ValidationError("[R.swift] Image named 'Logo' is used in nib 'LoginViewController', but couldn't be loaded.") }
      if UIKit.UIColor(named: "Red2", in: bundle, compatibleWith: nil) == nil { throw RswiftResources.ValidationError("[R.swift] Color named 'Red2' is used in nib 'LoginViewController', but couldn't be loaded.") }
    }
  }

  /// This `_R.storyboard` struct is generated, and contains static references to 1 storyboards.
  struct storyboard {
    let bundle: Foundation.Bundle
    var launchScreen: launchScreen { .init(bundle: bundle) }

    func launchScreen(bundle: Foundation.Bundle) -> launchScreen {
      .init(bundle: bundle)
    }
    func validate() throws {
      try self.launchScreen.validate()
    }


    /// Storyboard `LaunchScreen`.
    struct launchScreen: RswiftResources.StoryboardReference, RswiftResources.InitialControllerContainer {
      typealias InitialController = UIKit.UIViewController

      let bundle: Foundation.Bundle

      let name = "LaunchScreen"
      func validate() throws {

      }
    }
  }
}

PS:
So I tried building the app, but it failed with this error. Maybe that's why?

Multiple commands produce '.../Debug-iphonesimulator/bimb-authenticate-ios.build/Objects-normal/arm64/R.generated.stringsdata'

@Bawenang
Copy link
Author

Bawenang commented Oct 6, 2023

After I reverted and did it all over again, I got this instead:
Screenshot 2023-10-06 at 15 53 49
Screenshot 2023-10-06 at 15 53 57

Is it because I am using an M1 macbook?

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

1 participant