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

Build Failed #108

Closed
smallqiang opened this issue Jan 15, 2019 · 4 comments
Closed

Build Failed #108

smallqiang opened this issue Jan 15, 2019 · 4 comments

Comments

@smallqiang
Copy link

I jus use pod 'TPPDF' to install TPPDF. But an error was reported at compile time.
error1
error2
In the file PDFGraphics.

@philprime
Copy link
Member

What Swift version are you using and please provide the given error

@smallqiang
Copy link
Author

What Swift version are you using and please provide the given error

My project is used Swift4. And I have changed the TPPDF to Swift4.2. It's ok now. However, each pod update needs to be modified manually.

@philprime
Copy link
Member

Consider a Cocoapods post install script like the following:

post_install do |installer|
        installer.pods_project.targets.each do |target|
            if target.name == 'TPPDF'
                target.build_configurations.each do |config|
                    if config.name == 'Debug'
                        config.build_settings['SWIFT_VERSION'] = '4.2'
                    end
                end
            end
        end
    end

@smallqiang
Copy link
Author

Consider a Cocoapods post install script like the following:

post_install do |installer|
        installer.pods_project.targets.each do |target|
            if target.name == 'TPPDF'
                target.build_configurations.each do |config|
                    if config.name == 'Debug'
                        config.build_settings['SWIFT_VERSION'] = '4.2'
                    end
                end
            end
        end
    end

Thanks!

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

2 participants