works on simulator but not on device
Opened this issue · 5 comments
NSAttributedString *myAttributedString = [SLSMarkupParser attributedStringWithMarkup:myString style:style error:NULL];
the myAttributedString is always nil on my device, but it works on the simulator
What version of iOS are you using? Are you always getting this error or just sometimes? Could you post the values of myString
and style
that cause this error?
i'm using 7.0.4 on my iphone 5s, the myString = @"<h1>hello</h1>world", the style is the one you have on the home page
i'm using this
'Slash', '~>0.1.2', :inhibit_warnings => true
Also, could you tell me the message returned via the error parameter. Eg:
NSError *error;
NSAttributedString *myAttributedString = [SLSMarkupParser attributedStringWithMarkup:myString style:style error:&error];
NSLog(@"%@", error);
it is actually printing (null), could this be related to my build settings?
Unfortunately I haven't been able to reproduce this. My best guess is that it might be related to compiling for ARM64. So I can suggest trying the following things:
- Try building a 32-bit version if you are currently building for 64-bit.
- If you are using an older version of Xcode, try upgrading to a newer version.
- Try on a device running iOS 7.1 or newer
There's a small chance it might be related to your style dictionary, so maybe try using [SLSMarkupParser attributedStringWithMarkup:error:]
instead. I'd expect an issue there to crash instead of returning nil, but you never know...
Please let me know if any of those work! Your podfile line looked fine to me. I can't think of any build settings that would cause this to happen. Have you changed any of the build settings in your Xcode project?