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 library for proper Compiler-Level Optimization Setting (Release Build Crash Fix) #13
Comments
From my brief research, I think the issue may be stemming from your use of these in the library:
Here are some related issues I found that discussed the same problem: |
Oh man I’m really sorry that this caused your app to be rejected :(. It's the worst when 3rd party libraries cause problems in your app. The problem is that the Keychain Services API requires the use of an UnsafeMutablePointer to an Unmanaged AnyObject, i.e. func SecItemCopyMatching(query: CFDictionary!, result: UnsafeMutablePointer<Unmanaged<AnyObject>?>) -> OSStatus Unfortunately, I can't think of any way of getting around this requirement. If possible, I recommend using @soffes's SSKeychain. It's really stable and written in Objective-C, so it shouldn't have any of these crazy issues. Hopefully Apple fixes this bug ASAP. Sorry again, |
Hi @NitWitStudios & @matthewpalmer, I can't seem to reproduce the crash. Do you have a stack trace you could share? Pinpointing these crashes and collecting them is what the swift-compiler-crashes project does, so finding and documenting everyone of these helps. |
I think Issue #6 Is the original incarnation of this crash. That thread has a lot more information and ways to force the crash. Cheers, |
Darn, I should have search for it, my mistake! Thanks Matt! :) |
I was able to fix a similar issue with help from this link:
|
Would the compiler crash if you use |
My project is compiling without issues. It is a valid Swift function: |
I replaced all the unmanaged objects with the withUnsafeMutablePointer function which seemed to have resolved at least my issue where I would get a duplicate item-error when trying to save data in the release configuration with something other than -Onone. |
Thanks for all of the help everyone, and cheers to @olvidalo for the fix :) |
Awesome! Thumbs up to everyone who got involved in this issue! 👍 |
* 'master' of https://github.com/matthewpalmer/Locksmith: (42 commits) Remove note on buggy release builds; fixed in #14 replace unmanaged objects with withUnsafeMutablePointer to fix #13 Update README.markdown Update README.markdown Update README.markdown Update README.markdown Update README.markdown Update README.markdown Update README.markdown Update README.markdown Update README.markdown Added support for iCloud sync. Added support for different forms of security classes. Added basic tests Update README.markdown Removed requirement for the redundant 'key' argument Added method to clear the keychain Improve installation instructions Update README.markdown Update README.markdown Fix typo in readme ... Conflicts: .gitignore
I recently submitted my app to the store not realizing this library requires the optimization level of the compiler to be set to 'None' or it crashes on launch for release build. As a result, it was rejected by Apple due to crashing on start up.
I have since changed it to 'None' and now the app runs fine on release build, but reading Apple's documentation it states specifically the following for Compiler-Level Optimization of type None:
The Do not use this option for shipping your executable concerns me a bit for releasing a non-optimized build to the App Store.
Is there any possibility of fixing this library to not require this setting?
The text was updated successfully, but these errors were encountered: