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

[iOS 12] RXCoreData crash on iOS 12 #37

Closed
hoangtuanfithou opened this issue Jun 20, 2018 · 7 comments
Closed

[iOS 12] RXCoreData crash on iOS 12 #37

hoangtuanfithou opened this issue Jun 20, 2018 · 7 comments

Comments

@hoangtuanfithou
Copy link

it run nicely on iOS 11.
then check on iOS 12 -> crash. (mostly when fetch data)
more information will be updated
screen shot 2018-06-20 at 6 45 38 pm

@bobgodwinx
Copy link
Member

bobgodwinx commented Jun 21, 2018

I think we should wait for a GM before updating anything. It's still a beta version.

@grigorye
Copy link

Just in case, I was able to mitigate it by enforcing Swift optimization (-Osize) for RxCoreData target. If you use CocoaPods, you can get it by appending the following to your Podfile:

post_install do |installer|
  # Enforce optimization for Xcode 10 beta.
  installer.pods_project.targets.each do |target|
    if target.name =~ /^RxCoreData$/
      puts("Enforcing Swift optimization for RxCoreData/Xcode 10 beta")
      target.build_configurations.each do |configuration|
        configuration.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Osize'
      end
    end
  end
end

@hoangtuanfithou
Copy link
Author

hoangtuanfithou commented Jun 21, 2018

Confirm that @griforye method works for me. Thanks so much :)). Now I can use Xcode 10 with dark theme.
Can you explain more why it work :D

@bobgodwinx
Copy link
Member

@grigorye @hoangtuanfithou Let's see what happens later with the code size optimization option. It's pretty new and was introduced in here in Swift 4.1. If necessary we could activate it in the next version.

@grigorye
Copy link

@bobgodwinx Just in case, "-Osize" was just quick hack - I just noticed that the crash doesn't happen in Release builds and hence I tried to enable optimization. Probably it doesn't crash with other optimization options. Anyway, I completely agree that this is just a workaround and we should wait for GM. More or less it looks like a bug in (beta of) Swift compiler that hopefully would be fixed in the upcoming betas (beta 2 still crashes).

@grigorye
Copy link

grigorye commented Jul 7, 2018

I'm not completely sure about that, but it looks like it was fixed in Xcode 10 beta 3.

@hoangtuanfithou
Copy link
Author

hoangtuanfithou commented Jul 11, 2018

confirm that Xcode 10 beta 3 fixed it.

Thanks for your help, guys ! @grigorye @bobgodwinx
screen shot 2018-07-11 at 7 54 45 pm

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

3 participants