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

Support for swift on iOS 12.2 / XCode 10.2 #371

Closed
jdelfino opened this issue Mar 28, 2019 · 6 comments
Closed

Support for swift on iOS 12.2 / XCode 10.2 #371

jdelfino opened this issue Mar 28, 2019 · 6 comments
Labels
P2 We should fix this this quarter type: blocked on bazel This issue is waiting on a fix/release in Bazel

Comments

@jdelfino
Copy link

jdelfino commented Mar 28, 2019

I'm having trouble running iOS apps built with bazel 0.23.2, rules_apple 0.14, macOS 10.14.3 after upgrading to XCode 10.2

The surface problem I'm seeing are errors like this when trying to launch the app on a simulator from (a Tulsi-generated project for) XCode:

2019-03-27 14:37:08.774142-0400 CanopyDev[3813:3310546] This copy of libswiftCore.dylib requires an OS version prior to 12.2.0.

I see slightly more informative errors when trying to run an ios_unit_test from the command line:

objc[15404]: Class _TtCs18__stdlib_AtomicInt is implemented in both /Users/jdelfino/Library/Developer/CoreSimulator/Devices/DC32A664-6751-4206-B8D3-B1C2698E4E6A/data/Containers/Bundle/Application/7AFD5B16-5471-4639-A40B-68C36A72F699/CanopyDev.app/Frameworks/libswiftCore.dylib (0x10d967168) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswiftCore.dylib (0x123a65138). One of the two will be used. Which one is undefined.

... [many more similar] 

Something I suspect is related - with iOS 12.2, I believe Swift dylibs are now shipped with the OS. XCode 10.2 apparently no longer bundles these dylibs: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_2_release_notes/swift_5_release_notes_for_xcode_10_2?preferredLanguage=occ.

As a test, I hacked the rules to not include the dylibs for ios apps (https://github.com/bazelbuild/rules_apple/compare/master...ourcanopy:xcode10_2?expand=1). Both launching the app through XCode and running the unit test through the simulator work with this hack.

@keith
Copy link
Member

keith commented Mar 28, 2019

This should be fixed on master of rules_apple. Can you test your case to see?

@jdelfino
Copy link
Author

jdelfino commented Mar 28, 2019

Unfortunately, it is still broken on master (a75252a) for me.

@keith
Copy link
Member

keith commented Mar 28, 2019

Ah yes. The problem is fixed by bazelbuild/bazel#7830

@jdelfino
Copy link
Author

Thanks @keith! Will keep an eye on that issue & retest when a bazel build is available.

@sergiocampama sergiocampama added P2 We should fix this this quarter type: blocked on bazel This issue is waiting on a fix/release in Bazel labels Apr 2, 2019
@keith
Copy link
Member

keith commented Jun 28, 2019

This can be closed, this is fixed by newer versions of bazel

@thomasvl
Copy link
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We should fix this this quarter type: blocked on bazel This issue is waiting on a fix/release in Bazel
Projects
None yet
Development

No branches or pull requests

4 participants