Monday, September 29, 2014

find ios Version

Finding the IOS version on a device programatically.

key here is to use the NSFoundationVersionNumber  and compare it with the in built NSFoundationVersionNumber_iOS_7_1  or what ever other ones you want to compare.

For my need i am just checking to see if the IOS version is atleast 8 and above..

-(bool) isOSAtleastVersion8{
     bool is_IOS8=false;
     if(floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_7_1)
     {
        is_IOS8=true;
     }
     else
     {
           is_IOS8=false;
     }

 return is_IOS8;
}
-- Bobby

IOS 8.0.2 navigationcontroller pushviewcontroller delay/slow

strange issue noticed while upgrading the app to IOS 8.0.2 with xcode 6.

App which moves between viewcontrollers, started getting lag when using the navigationcontroller.pushviewcontroller

It was working fine till IOS 7.1

Here is a temporary fix for now.. had to make the animated:NO instead of animated:YES and the screens are showing now without any delay.

working code till 7.1:
[self.navigationController pushViewController:vhome animated:YES];

had to be changed to
[self.navigationController pushViewController:vhome animated:NO]; to remove the delay while presenting the new screen in IOS 8.0.2

Will update this code once i figure out the issue.

-Bobby

Sunday, April 6, 2014

Enterprise App cannot install applications because the certificate for server is invalid

You might see a error that says "cannot install applications because the certificate for server is invalid" while installing ipa over the air. This seems to be a issue with ios7.1 works fine with all other versions.



Trick is to put the https in the URL instead of the http in the htm file.

 change the following URL from
<a href="itms-services://?action=download-manifest&url=http://server.com/IPA/abc.plist">Install My App</a>
to
<a href="itms-services://?action=download-manifest&url=https://server.com/IPA/abc.plist">Install My App</a>

Bob

Saturday, March 15, 2014

nsdictionry writing to File blank file getting created

Blank file getting created after saving Dictionary to a file.

The Cocoa API is very specific about what kind of values can legally be in a dictionary when it is written out to file. One particular limitation that has been known to cause problems and which is not thoroughly discussed in the official API documentation is that all of the keys in your dictionary must be of type NSString (and your values must be one of NSData, NSDate, NSNumber, NSString, NSArray, or NSDictionary), even though the dictionary itself supports keys and values of any object type.

from url: http://stackoverflow.com/questions/5361630/iphone-writing-nsmutabledictionary-to-file