apptentive / apptentive-ios

Apptentive Legacy SDK for iOS. See https://github.com/apptentive/apptentive-kit-ios for Version 6.
http://www.apptentive.com/
BSD 3-Clause "New" or "Revised" License
146 stars 103 forks source link

Crash while using Apptentive library via Cocoapods #79

Closed gagarwal closed 10 years ago

gagarwal commented 10 years ago

I am using Apptentive version v1.2.6 and getting following crash:

*\ Assertion failure in -[ATEvent apiJSON], /Users/pkamb/Desktop/Apptentive Code/apptentive-ios/ApptentiveConnect/source/Model/ATEvent.m:52

This is a NSAssert failure. I just cloned the Apptentive code from GitHub repository (https://github.com/apptentive/apptentive-ios.git) and found that in v1.2.7 the code at ATEvent.m:52 is changed to have "ATLogError" instead of NSAssert(s).

But still there are lot of NSAssert(s) in Apptentive code base. The library that I am getting through Cocoapods is having NSAssert(s) ENABLED. It should be release library with "NS_BLOCK_ASSERTIONS" Preprocessor Macros flag set. Setting this flag will DISABLE NSAssert(s) in the release version of library, and thus when others integrate this library in their projects, application will not crash.

This seems like a blocking issue for me, as I cannot release my application with NSAssert(s) enabled.

Let me know if you need more information. You can reach me at: gaurav.agarwal@inrix.com

Regards Gaurav Agarwal

pkamb commented 10 years ago

Thanks for the report. The specific assert here was removed in 1.2.7, which should fix the immediate issue. I will also apply NS_BLOCK_ASSERTIONS to the static library build for the next release.

pkamb commented 10 years ago

Fixed in v1.2.8