how can i fix the ios api error cache manager

0 votes

App42 cache manager network first policy checks for reachability and it takes a few seconds to respond
And if some one turned off the net and use app42 before it checks reachability changed the app will crash

asked Jun 15, 2016 in iOS by w.ajdi1 (33 points)

1 Answer

+1 vote
 
Best answer
Hi,

The team is checking this and will update you as soon as possible.

Thanks.
answered Jun 16, 2016 by rajeev.etc (1,660 points)
selected Jul 4, 2016 by w.ajdi1
Note : i am using cache with the ios leaderboard widget
Hi,

We have fixed the issue and updated the SDK to our github repo(https://github.com/shephertz/App42_iOS_SDK/tree/master/3.5.5/AsyncAPI).
Please download the latest SDK and check at your end.
Let me know if the issue continues.

Thanks.
the issue still exists if i try to open the leaderboard widget after i turn off the internet and before
App42Trace: -[App42CacheManager reachabilityChanged:]
App42Trace: -[App42CacheManager updateNetworkStatus:]
these are logged the app will crash but if i try to open the widget after it will work fine
Hi,

I tried to reproduce the same but no luck.
Could you please share the SDK internal logs which you get just before the issue comes along with crash log? It will help us to debug the problem.

To get the SDK internal logs please add the following code just after App42API initialization:
      
       [App42API enableApp42Trace:YES];


Thanks.
These are logged when app42trace is enabled i can provide a video if you want
Hi,

I requested for complete logs along with the crash log from xcode console because it will give me idea about the issue and the origin of the crash. Looking at the crash log i can trace back to the exact problem.
Could you please send me the complete Xcode Console log when this crash is happening? It will really help me to debug this problem.

Thanks.
From where can I give you the logs
http://pastebin.com/f8GbkFn6

i hope that this is what you need
Hi,

The logs you have shared shows that you are using the older version of SDK.

Please download the latest SDK from here(https://www.dropbox.com/s/r1g4cqnnxy7etes/Shephertz_App42_iOS_API.framework.zip?dl=0) and let me know if the issue continues.

Thanks.
the issue still exists and this version also shows the sdk version 3.3
the sdk version is wrong in the api
and can you please reply faster
the issue that if i use the leaderboard after turning off the internet and before App42Trace: -[App42CacheManager reachabilityChanged:]
App42Trace: -[App42CacheManager updateNetworkStatus:]
these are called it tries to grab the scores but it failed so the the no connection message appears and the cache manager execute these
App42Trace: -[App42CacheManager saveObject:forKey:toCacheWithType:]
App42Trace: isWrittenSuccessfully = 1
so it saves nil to the cache and when i open it again with no net it will try to set the
tableview's data in the leaderboard widget to nil and that will case the app to crash
and i have to enter the leaderboard multiple times to cause the crash
Hi,
Could you please share the sample project in which you are getting this issue?
It will help us to debug this in your code itself in which you are testing.

You can share the project on support@shephertz.com.

Thanks.
Do you mean the project I'm sorry but I can't share
my project with you
I can provide a video on how to generate the error
Hi,

The new SDK shared with you, should print the version 3.5.5 in the log. If you are still getting version as 3.3 then it is possible that the project is still using the older SDK not the new SDK which i have shared with you. Please check the same at your end as you should get the version 3.5.5 in the logs for new SDK.

If this is not the case then we can have Skype call tomorrow for the same. Please share your Skype details on support@shephertz.com and available timings for the call so that i can schedule.

Thanks.
i replaced the old sdk with this one and it still prints the same
I'm really really sorry turns out Xcode was using the old framework because it
searchs the whole project folder and uses the oldest framework even if the newer one is selected
there is still an issue if you use the leaderboard before these
App42Trace: -[App42CacheManager reachabilityChanged:]
App42Trace: -[App42CacheManager updateNetworkStatus:]
are called the no internet connection message will appear
Please respond
Hi,

Could you please provide the xcode console log for this new issue as I am not able to reproduce it at my end. It will help to track the exact root of the issue to fix it.

Regards,
Rajeev
i am going to post 2 logs

this one is when i open the leaderboard widget after i turn off the internet and these are logged
App42Trace: -[App42CacheManager reachabilityChanged:]
App42Trace: -[App42CacheManager updateNetworkStatus:]
this is the normal situation http://pastebin.com/UXHZQr4M

this one if i open the leaderboard widget after i turn off the internet and before these are logged
App42Trace: -[App42CacheManager reachabilityChanged:]
App42Trace: -[App42CacheManager updateNetworkStatus:]
the (there is no data to show) message appears (the error)
http://pastebin.com/71qMrmqr
please answer quickly
Hi,

I checked the sample and it is working fine at my end. It gives no data message only when i run the app first time with no internet, because there is no data in the cache. Once you have the data in the cache you will not get this message again.
You can install the app and run it at least one time with internet connection then you switch of the internet and it will give you the data for that particular request.

Let me know if you have any further queries.

Regards,
Rajeev
the two logs are after i at least open it one time

if you want to reproduce the error you have to turn off wifi and very quickly use the leaderboard widget and the messege will appear
i think it is better for me to provide a video
please answer quickly
please read
and tell me if you want a video
Hi,

Yes, it would be great help if you can share the video which can help me to reproduce the same. Meanwhile, i am also trying to reproduce the same at my end.

Regards,
Rajeev
Here is the link

https://www.youtube.com/watch?v=-TTh3EC9_ZM

please reply quickly
Please reply quickly
Hi,

I have done some changes in the SDK to fix this problem. You can download the updated SDK from here(https://www.dropbox.com/s/luvgs99ksdsop06/Shephertz_App42_iOS_API.zip?dl=0). Please check the same at your end and let me know if the problem continues.

Regards,
Rajeev
no it is not fixed the problem is still there

you could fix it by
not monitoring network and try to ping a site to check connection
and
not saving to cache if the data is nill
Please answer
Did you try it yet
Yes, we are working on it and will share the updated SDK by today EOD.
Ok thanks for responding
Hi,

I have fixed this problem and it is working fine at my end now. Please download the updated SDK from here(https://www.dropbox.com/s/luvgs99ksdsop06/Shephertz_App42_iOS_API.zip?dl=0) and check at your end.

Let me know if you have any other queries.

Regards,
Rajeev
yes it know works but this SDK prints out 3.5.3 not 3.5.5
Please update sdk on github
Please do it asap
Hi,

Apologies for the late reply.
I have updated the SDK to the github repo(https://github.com/shephertz/App42_iOS_SDK/tree/master/3.5.5/AsyncAPI).

Please check the same at your end and let me know if you have any queries.

Regards,
Rajeev
thanks it is now working
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...