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

Fix compatibility issues with iOS 8/Xcode 6 #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Fix compatibility issues with iOS 8/Xcode 6 #8

wants to merge 3 commits into from

Conversation

schmatz
Copy link

@schmatz schmatz commented Aug 14, 2014

It seems that with Swift and iOS 8, the typedef regex_t conflicts with an existing typedef in the iOS8 SDK (which can be found in /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/usr/include/regex.h on line 110).

With Objective-C, it has no problems compiling, but there must be a bug in the Swift compiler there is an issue which causes the names to conflict.

I also applied a fix to the tests that makes them pass (the NSRange comparison behaviour changed) and fixed how SenTestingFramework was linked.

Thanks for writing these bindings!

It seems that with Swift and iOS 8, the typedef regex_t conflicts with
an existing typedef in the iOS8 SDK
(/Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/iPhoneSimul
ator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/usr/include). With
Objective-C, it has no problems compiling, but there must be a bug in
the Swift compiler there is an issue which causes the names to conflict.
XCTAssertEqual cannot compare ranges anymore, so I added a helper
function to compare the ranges.
The link was broken, so I fixed it. Changing the SenTestingKit to
optional allows the tests to run and pass.
@schmatz
Copy link
Author

schmatz commented Aug 14, 2014

Also I realize that this may require modification of the Oniguruma library, but on Macs it's a quick one liner: find . -type f -name '*.*' -print0 | xargs -0 sed -i -e 's/regex_t/onig_regex_t/g'

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

Successfully merging this pull request may close these issues.

1 participant