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

Crash when using Swift standard libraries #38

Closed
dm-z opened this issue Jun 27, 2017 · 2 comments
Closed

Crash when using Swift standard libraries #38

dm-z opened this issue Jun 27, 2017 · 2 comments

Comments

@dm-z
Copy link
Collaborator

dm-z commented Jun 27, 2017

I've found an interesting crash, and I'm not sure what would be an ideal solution to fix it.

So steps to reproduce:

  1. Generate a project from template
  2. Add function to YourProjectName.swift
    func crushFunc() {
    print("Let's crash!")
    }
  3. Compile the project for target "iOS Example" or "YouProjectNameTests", you don't even need to call a function, it will crash on launch

To fix this, I had to turn on build setting "Always Embed Swift Standard Libraries" -> YES for both targets (Example and Tests), otherwise it will crash on launch. But this fix will generate warnings if user wants to add Pod Dependencies to the project (Debug + Release for Example and Test targets - 4 combined warning when installing cocoapods):

[!] The iOS Example [Debug] target overrides the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting defined in ../Pods/Target Support Files/Pods-iOS Example/Pods-iOS Example.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the $(inherited)` flag, or
- Remove the build settings from the target.

@fulldecent
Copy link
Owner

fulldecent commented Jun 28, 2017

That you for reporting!

Redonckulous problems like this are exactly why I created this project. So now we can go to the jury and say EXACTLY which REPRODUCIBLE steps we did to get into this hole. And then we can learn which step was wrong.

@fulldecent
Copy link
Owner

This appears to be fixed in the latest version.

Here is a complete test cast working with those steps.

https://youtu.be/RKXocrL22hc

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