Coder Social home page Coder Social logo

Comments (8)

levinli303 avatar levinli303 commented on May 17, 2024

can you please provide a sample project here? that would help us reproduce this issue. thanks

from fluentdarkmodekit.

RisingSSR avatar RisingSSR commented on May 17, 2024

Emmm, I think this is my problem. I have encapsulated a simpler usage based on your API, but the problem is here. It seems that I cannot reproduce this bug.

unsupported Swift architecture

----------------------------------------

SchemeBuildError: Failed to build the scheme "AWidgetExtension"

unsupported Swift architecture

Build target A:
warning: Run script build phase '[CP] Embed Pods Frameworks' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'A' from project 'A')
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'A' from project 'A')


Compile UIColor+Rising.m (arm64):
While building module 'FluentDarkModeKit' imported from /Users/ssr/Documents/SSR Program/A/A/Pod/Rising Extension/UIKit Extension/UIColor+Rising.m:10:
In file included from <module-includes>:2:
/Users/ssr/Library/Developer/Xcode/DerivedData/A-djijmevprrjlzdbajspncoilhydx/Build/Intermediates.noindex/Previews/AWidgetExtension/Products/Debug-iphonesimulator/FluentDarkModeKit/FluentDarkModeKit.framework/Headers/FluentDarkModeKit-Swift.h:351:2: error: unsupported Swift architecture
#error unsupported Swift architecture
 ^
1 error generated.
/Users/ssr/Documents/SSR Program/A/A/Pod/Rising Extension/UIKit Extension/UIColor+Rising.m:10:9: fatal error: could not build module 'FluentDarkModeKit'
#import <FluentDarkModeKit/FluentDarkModeKit.h>
 ~~~~~~~^
2 errors generated.

UIColor+Rising is a faster way to use your API and is integrated into the PCH file.

from fluentdarkmodekit.

RisingSSR avatar RisingSSR commented on May 17, 2024

Yep, Now I have reproduced this bug. It seems that it is caused by the podfile. Is there a better way to solve it?
see: https://github.com/HONEY-SSR/FluentDarkTest
please check out SwiftUIView.swift, Canvas cannot use.

from fluentdarkmodekit.

levinli303 avatar levinli303 commented on May 17, 2024

it might be the post hook in the Podfile that is to blame. Are you building for simulator on apple silicon?

post_install do |installer|
    installer.pods_project.build_configurations.each do |config|
        config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
        config.build_settings['VALID_ARCHS'] = 'arm64 arm64e armv7 armv7s x86_64 i386'
        config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
        config.build_settings['HEADER_SEARCH_PATHS'] = '$(PROJECT_DIR)/**'
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
        config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
        config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
        config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
    end
end

from fluentdarkmodekit.

RisingSSR avatar RisingSSR commented on May 17, 2024

Yep. Now I know what the problem is.
First, I need YYKit, but it needs architecture arm64
so that there is config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'.
but the FluentDarkModeKit unsupported architecture arm64
but I seem to have no idea how to use these two pods at the same time.

from fluentdarkmodekit.

levinli303 avatar levinli303 commented on May 17, 2024

setting `config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64' means that it does not support arm64 simulator. Since it is set by YYKit, it means YYKit doesn't support arm64 simulator. FluentDarkModeKit supports any architecture you are building against.

Xcode will only build simulator app in x86_64 (running in Rosetta mode) when all the targets in the project excludes arm64 in the target settings (this include both your main project and the Pods project).

To get your project to build, you have to change the project setting (not the Pods project) setting `config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64' in every target so that Xcode will build x86_64 version of everything and runs the app in Rosetta mode.

from fluentdarkmodekit.

RisingSSR avatar RisingSSR commented on May 17, 2024

Thank you for your suggestions. I will try my best to try every possible way again. If I make progress, I will continue to write under this issue.

from fluentdarkmodekit.

levinli303 avatar levinli303 commented on May 17, 2024

closing since it is unrelated to the project.

from fluentdarkmodekit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.