Giter Club home page Giter Club logo

licenselist's People

Contributors

charlie-dev-ios avatar elmetal avatar koher avatar kyome22 avatar nnabeyang avatar snq-2001 avatar uhooi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

licenselist's Issues

The demo app could not be built.

Both UIKit and SwiftUI demo apps could not be built.
The reproduction steps are as follows.

  1. clone this repository.
  2. open LicenseDemo/LicenseDemo.xcodeproj in Xcode 15.1.
  3. wait until the SPM library is loaded.
  4. select the LicenseDemoForSwiftUI or LicenseDemoForUIKit scheme.
  5. set the installation destination to the iPhone 15 simulator.
  6. run the application.
  7. the following error is displayed.

LicenseList/LicenseDemo/LicenseDemo.xcodeproj: Package product 'LicenseList' is missing.

スクリーンショット 2024-01-17 9 47 53

Is this compatible with Xcode15?
Or do I need to do any additional steps?

No such module になってしまう

自信のプロジェクトで使用しようとしたが No such module で出来ず。
確認の為、こちらのデモプロジェクトを手元でも試してみましたが、同様の現象が起きるので issue をあげておきます🙏

Xcode13.3
MacOS Monterey 12.5
Apple M1

Artifact Bundleをリリースに含めてほしい

Package Pluginからもぜひ利用したいため、リリースにartifact bundleを含める運用をお願いしたいです。
参考までにこちらでArtifact Bundleを実際に作ってみました。(参考: https://theswiftdev.com/introduction-to-spm-artifact-bundles/

またフォーク先で独自にリリースを作り、実際に以下のPluginを書くことでplistが書き出されていることを確認することができました。

import Foundation
import PackagePlugin

@main
struct LicenseListPlugin: BuildToolPlugin {
    func createBuildCommands(context: PluginContext, target: Target) async throws -> [Command] {
        let regex = try! NSRegularExpression(pattern: ".*SourcePackages")
        let pluginWorkDirectory = context.pluginWorkDirectory.string
        guard let matchRange = regex.firstMatch(in: pluginWorkDirectory, range: NSRange(0..<pluginWorkDirectory.count))?.range(at: 0) else {
            print("Failed match")
            return []
        }
        let sourcePackageDirectory = NSString(string: pluginWorkDirectory).substring(with: matchRange)
        
        return [
            .prebuildCommand(
                displayName: "LicenseList",
                executable: try context.tool(named: "spp").path,
                arguments: [
                    target.directory.string,
                    sourcePackageDirectory,
                ],
                environment: [:],
                outputFilesDirectory: context.pluginWorkDirectory
            )
        ]
    }
}

Package.swiftでは以下のように指定しています。

var package = Package(
    targets: [
        .target(
            name: "SomeFeature",
            resources: [.process("license-list.plist")],
            plugins: [.plugin(name: "LicenseListPlugin")]
        ),
        .plugin(
            name: "LicenseListPlugin",
            capability: .buildTool(),
            dependencies: [
                .target(name: "licenselist")
            ]
        ),
        .binaryTarget(
            name: "licenselist",
            url: "https://github.com/touyou/LicenseList/releases/download/0.1.5/licenselist.artifactbundle.zip",
            checksum: "02d1b096c60dd0a4f3ff67a6ec82d801c6a609867fc84aa9ad40d00b42395417"
        )
    ]
)

SwiftUI Preview crashes with this plugin

SwiftUI Preview builds crashes with HumanReadableSwiftError.

I'm not 100% sure this plugin caused the crash directly because I couldn't find any concrete information from the log. But with the PrepareLicenseList plugin in the Run Build Tool Plug-ins of our project, SwiftUI build crashes and shows the error below:

(Crash report here)

== DATE:

    Tuesday, September 26, 2023 16:15:09 Japan Standard Time
    
    2023-09-26T07:15:09Z



== PREVIEW UPDATE ERROR:

    HumanReadableSwiftError
    
    ProviderError: ProviderError: noPreviewInfos(runDestination: Simulator - iOS 16.4 | iphonesimulator | arm64 | iPhone 14 Pro Max | no proxy, thunkConfiguration: <IDEBuildOperationConfiguration: 0x6000cb0ca220; buildParameters=<IDEBuildParameters:0x6000638f5540:action=build:command=<IDEConcretePrimitiveSchemeCommand:0x600000b13c60:Run>:config=Debug:dest=iPhone 14 Pro Max:arch=arm64:workspaceArena=<IDEWorkspaceArenaSnapshot: 0x6000036ebb00>:
    overridingProperties=(
    { // Preview overrides (immutable)
       DSTROOT = 【𝗟𝗶𝘁𝗲𝗿𝗮𝗹𝗦𝘁𝗿𝗶𝗻𝗴:/Users/tagomoris/Library/Developer/Xcode/DerivedData/AppNameApp-cfygiazockoadqaxpradjsqjnoxo/Build/Intermediates.noindex/Previews/Development/ReleaseProducts】
       ENABLE_PREVIEWS = 【YES】
       OBJROOT = 【𝗟𝗶𝘁𝗲𝗿𝗮𝗹𝗦𝘁𝗿𝗶𝗻𝗴:/Users/tagomoris/Library/Developer/Xcode/DerivedData/AppNameApp-cfygiazockoadqaxpradjsqjnoxo/Build/Intermediates.noindex/Previews/Development/Intermediates.noindex】
       SYMROOT = 【𝗟𝗶𝘁𝗲𝗿𝗮𝗹𝗦𝘁𝗿𝗶𝗻𝗴:/Users/tagomoris/Library/Developer/Xcode/DerivedData/AppNameApp-cfygiazockoadqaxpradjsqjnoxo/Build/Intermediates.noindex/Previews/Development/Products】
    },
    ):
    collectBuildTimeStatistics=NO
    collectTimelineMetrics=NO>:executionEnvironment=<IDEExecutionEnvironment: 0x14e841dc0>:singleFileToBuild=(null):buildLog=(null):parallelizeBuildables=YES:dontActuallyRunCommands=NO:buildImplicitDependencies=YES:skipDependencies=NO:restorePersistedBuildResults=YES:enableIndexBuildArena=NO:buildables=(
        "<Xcode3TargetProduct:0x600003e4c840:AppName.app blueprint:<Xcode3Target:0x14d68cca0:AppName>>"
    ):subsetOfBuildables=(null):buildDescriptionID=(null):scheme=<IDEScheme:0x14e914120:'Development'>:schemeTask=BuildAndCommand:clientInfo=(null)>, blueprintName: AppName, sourceFilePath: /Users/tagomoris/pt/pathtraq-app-ios/AppName/AppName/views/PreferenceView.swift, thunkVariantSuffix: __XCPREVIEW_THUNKSUFFIX__)

== VERSION INFO:

    Tools: 14E300c
    OS:    22F82
    PID:   38975
    Model: MacBook Air
    Arch:  arm64e



== ENVIRONMENT:

    openFiles = [
        /Users/tagomoris/pt/pathtraq-app-ios/AppName/AppName/views/PreferenceView.swift
    ]
    wantsNewBuildSystem = true
    newBuildSystemAvailable = true
    activeScheme = Development
    activeRunDestination = iPad (14) variant iphoneos arm64
    workspaceArena = [x]
    buildArena = [x]
    buildableEntries = [
        AppName.app
    ]



== SELECTED RUN DESTINATION:

    name = iPad (14)
    eligible = true
    sdk = Optional(<DVTSDK:0x14e90b070:'iphoneos16.4':iOS 16.4:<DVTFilePath:0x6000030cd260:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk'>>)
    variant = Optional("iphoneos")
    device = Optional(📱<DVTiOSDevice (0x2cca96630), iPad (14), iPad, 16.6.1 (20G81), 00008027-0005098E0A22002E> {
    		deviceSerialNumber:         DMPXP3MKKD6N
    		identifier:                 00008027-0005098E0A22002E
    		deviceClass:                iPad
    		deviceName:                 iPad (14)
    		deviceIdentifier:           00008027-0005098E0A22002E
    		productVersion:             16.6.1
    		thinningProductType:        iPad8,1
    		buildVersion:               20G81
    		deviceSoftwareVersion:      16.6.1 (20G81)
    		deviceArchitecture:         arm64e
    		deviceTotalCapacity:        506775244800
    		deviceAvailableCapacity:    11194494976
    		deviceIsTransient:          NO
    		ignored:                    NO
    		deviceIsBusy:               NO
    		deviceIsPaired:             YES
    		deviceIsActivated:          YES
    		deviceActivationState:      Activated
    		isPasscodeLocked:           YES
    		deviceType:                 <DVTDeviceType:0x60000330c380 Xcode.DeviceType.iPhone>
    		supportedDeviceFamilies:    (
        1,
        2
    )
    		applications:              {(
            (snip)
    )}
    		provisioningProfiles:      (
        "iOS Team Provisioning Profile: *"
    )
    		hasInternalSupport:        NO
    		hasWritableSystem:         NO
    		isSupportedOS:             YES
    		bootArgs:                  (null)
    		nextBootArgs:              (null)
    		connected:                 YES
    		isWirelessEnabled:         NO
    		connectionType:            direct
    		hostname:                  (null)
    		bonjourServiceName:        4c:56:9d:62:ab:72@fe80::4e56:9dff:fe62:ab72-supportsRP-17._apple-mobdev2._tcp.local.
    		activeProxiedDevice:       (null)
    		})



== SELECTED RUN DESTINATION:

    iOS 16.4 | iphoneos | arm64 | iPad Pro (11-inch) | no proxy
    
    Destination Preferences {
        platform: iphonesimulator
        deviceName: iPad (14)
        deviceModel: iPad Pro (11-inch)
    }
    
    Proxy:
    Destination Preferences {
    }



== SESSION GROUP 23977:

    workspace identifier: WorkspaceIdentifier(identifier: 7328D276-3707-4BDC-800C-66F1C6A483E5)
    providers: [
        PreferenceView_Previews /Users/tagomoris/pt/pathtraq-app-ios/AppName/AppName/views/PreferenceView.swift
    ]
    translation units: [
        /Users/tagomoris/pt/pathtraq-app-ios/AppName/AppName/views/PreferenceView.swift
    ]
    attributes: EditorSettingsCollection(storage: [PreviewsPipeline.EditorIdentifier(id: 23954): PreviewsPipeline.EditorSettings(defaultPreviewSettings: PreviewsPipeline.PreviewSettings(storage: [ObjectIdentifier(0x00000002c3c8ede0): PreviewsPipeline.PreviewSettings.(unknown context at $2c3c4bad4).ValueBox(value: true, isEqual: (Function), isDefaultValue: false), ObjectIdentifier(0x00000002c3c8ee10): PreviewsPipeline.PreviewSettings.(unknown context at $2c3c4bad4).ValueBox(value: false, isEqual: (Function), isDefaultValue: false)]), appPreviewDestinationRequirements: PreviewsPipeline.DestinationRequirements(rule: PreviewsPipeline.DestinationRequirements.(unknown context at $2c3c3ea34).Rule.none), isAppPreviewEnabled: false, _isLightboxEnabled: PreviewsFoundation.UserDefault<Swift.Bool>(key: "UVCanvasEnablePreviewShowAll", cachedValue: false, encoder: Foundation.JSONEncoder), suppressAppPreviewWhenPreviewProvidersArePresent: false, storage: [:])])
    session: 23978
    request sessions: [
        Preference View | PreferenceView_Previews: not completed
    ]



== UPDATE SESSION 23978:

    Start Date: Tuesday, September 26, 2023 16:14:55 Japan Standard Time
    Preview Provider {
        Simulator {
            platform: iphonesimulator
            device: 70376D8D-9E52-42CA-97A6-8042EADAAC29 iPhone 14 Pro Max
            buildNumber: 20E247
            runtimePath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime
        }
        host bundle: 
        is.tagomor.pathtraq.ios.AppNameApp.AppName {
            url: file:///Users/tagomoris/Library/Developer/Xcode/DerivedData/AppNameApp-cfygiazockoadqaxpradjsqjnoxo/Build/Intermediates.noindex/Previews/Development/Products/Debug-iphonesimulator/AppName.app
            version: 23983
            signingInformation: 
            Code Signing {
                identifier: is.tagomor.pathtraq.ios.AppNameApp.AppName
                hasGetTaskAllow: false
                isSandboxed: false
            }
            attributes: [
                LaunchConfigEnvironmentVariablesPreviewAttributesKey: ["OS_ACTIVITY_DT_MODE": "YES", "DYLD_FRAMEWORK_PATH": "/Users/tagomoris/Library/Developer/Xcode/DerivedData/AppNameApp-cfygiazockoadqaxpradjsqjnoxo/Build/Intermediates.noindex/Previews/Development/Products/Debug-iphonesimulator", "PACKAGE_RESOURCE_BUNDLE_URL": "/Users/tagomoris/Library/Developer/Xcode/DerivedData/AppNameApp-cfygiazockoadqaxpradjsqjnoxo/Build/Intermediates.noindex/Previews/Development/Products/Debug-iphonesimulator", "__XPC_DYLD_FRAMEWORK_PATH": "/Users/tagomoris/Library/Developer/Xcode/DerivedData/AppNameApp-cfygiazockoadqaxpradjsqjnoxo/Build/Intermediates.noindex/Previews/Development/Products/Debug-iphonesimulator", "DYLD_LIBRARY_PATH": "/Users/tagomoris/Library/Developer/Xcode/DerivedData/AppNameApp-cfygiazockoadqaxpradjsqjnoxo/Build/Intermediates.noindex/Previews/Development/Products/Debug-iphonesimulator", "__XCODE_BUILT_PRODUCTS_DIR_PATHS": "/Users/tagomoris/Library/Developer/Xcode/DerivedData/AppNameApp-cfygiazockoadqaxpradjsqjnoxo/Build/Intermediates.noindex/Previews/Development/Products/Debug-iphonesimulator", "SQLITE_ENABLE_THREAD_ASSERTIONS": "1", "DYLD_INSERT_LIBRARIES": "/System/Library/PrivateFrameworks/LiveExecutionResultsProbe.framework/LiveExecutionResultsProbe", "__XPC_DYLD_LIBRARY_PATH": "/Users/tagomoris/Library/Developer/Xcode/DerivedData/AppNameApp-cfygiazockoadqaxpradjsqjnoxo/Build/Intermediates.noindex/Previews/Development/Products/Debug-iphonesimulator"],
                AppExtensionIdentifierPreviewAttributeKey: nil,
                LaunchConfigArgumentsPreviewAttributesKey: [],
                AgentRoleKey: Previews,
            ]
        }
    }
    Build Graph {
        target app AppName.app (#1)
           (snip)
           target dynamicPackageProduct LicenseList (#55)
              target dynamicPackageProduct LicenseList (#56)
           translationUnit PreferenceView.swift (#57)
           Preview Provider Preference View Preference View (#58)
    }
    Update Plan {
        iOS [arm64 iphonesimulator16.4 iphonesimulator] (iPhone 14 Pro Max, 563E5B9E-4D06-4AFB-9EF4-1959AD8A0E1D-iphonesimulator16.4-arm64-iphonesimulator), [], thinning disabled) {
            Destination: iPhone 14 Pro Max 563E5B9E-4D06-4AFB-9EF4-1959AD8A0E1D | default device for iphonesimulator [
                AppName app - Previews {
                    execution points [
                        provider AppName.PreferenceView_Previews
                    ]
                    translation units [
                        PreferenceView.swift (in AppName.app)
                    ]
                    modules [
                        AWSClientRuntime
                        AWSCognitoAuthPlugin
                        AWSCognitoIdentity
                        AWSCognitoIdentityProvider
                        AWSPluginsCore
                        Amplify
                        AmplifyBigInteger
                        AmplifySRP
                        AwsCAuth
                        AwsCCal
                        AwsCCommon
                        AwsCCompression
                        AwsCEventStream
                        AwsCHttp
                        AwsCIo
                        AwsCPlatformConfig
                        AwsCSdkUtils
                        AwsChecksums
                        AwsCommonRuntimeKit
                        Bid
                        CachedAsyncImage
                        ClientRuntime
                        Collections
                        DequeModule
                        KeychainAccess
                        LicenseList
                        Logging
                        MarkdownUI
                        OrderedCollections
                        AppName.app
                        Realm
                        RealmCore
                        RealmSwift
                        ULID
                        XMLCoder
                        cmark-gfm
                        libtommathAmplify
                    ]
                }
            ]
        }
    }



== POWER STATE LOGS:

    2023/09/26 16:07 Received power source state: Battery Powered (lowPowerMode: false, status: charged, level: 100%)
    2023/09/26 16:07 No device power state user override user default value.Current power state: Full Power

The crash doesn't happen just after "Clean Build Folder". But it happens after some actions, like file changes, switching build targets, and executing the app on simulators.
And I didn't see similar crashes when I ran builds for simulators or real devices.

Are there any things that I can do for the investigation?

At last, this library is great and very helpful to our project. Thank you for the great work!

XcodeCloudでのビルドが通らない

LicenseListをRun Build Tool Plug-inに追加すると発生する

IDESkipPackagePluginFingerprintValidatationは設定済み

defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES

エラー内容

Command exited with non-zero exit-code: 65

参考

以下のライブラリだとXcodeCloudのビルドは通る
https://github.com/zunda-pixel/LicenseProvider/

ここで発見した
https://twitter.com/d_date/status/1671347277489917953

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.