Skip to main content

Posts

Showing posts from February, 2016

dyld: Library not loaded: @rpath/libswiftCore.dylib

If you have triedRestarting Xcode, iPhone, computerCleaning & rebuildingRevoking and creating new certificate/provision profileRunpath Search Paths is $(inherited) @executable_path/FrameworksEmbedded Content Contains Swift Code is 'Yes'Code Signing Identity is developerBelow is the error in entiretydyld:Librarynot loaded:@rpath/libswiftCore.dylib Referencedfrom:/private/var/mobile/Containers/Bundle/Application/LONGSERIALNUMBER/AppName.app/AppNameReason:no suitable image found.Did find:/private/var/mobile/Containers/Bundle/Application/LONGSERIALNUMBER/AppName.app/Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x008A1000,

How to log a method's execution time exactly in milliseconds?

If you want to use in coding style, then use these statements,
NSDate*methodStart =[NSDate date];/* ... Do whatever you need to do ... */NSDate*methodFinish =[NSDate date];NSTimeInterval executionTime =[methodFinish timeIntervalSinceDate:methodStart];NSLog(@"executionTime = %f", executionTime);Easy to use and has sub-millisecond precision.But if you want use macros, then this is good approach
#define TICK NSDate*startTime =[NSDate date]#define TOCK NSLog(@"Time: %f",-[startTime timeIntervalSinceNow])Use it like this:TICK;/* ... Do Some Work Here ... */ TOCK;I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too. 
Stay tuned to my blog,

Assign a variable inside a Block to a variable outside a Block

You need to use this line of code to resolve your problem:__block Person*aPerson = nil;For more details, please refer to this tutorial : Blocks and VariablesI guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too. 
Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.
This article is related to

iPad,iPhone,iPhone Resources,iPhone Articles,iPhone Development,iPhone Game Development,iPhone Turorial,Mobile Development Tutorials,Mobile Developments,Objective C

Remove all the subviews from a UIScrollView?

Let scrollView be an instance of UIScrollView.In Objective-C, it's pretty easy. Just call makeObjectsPerformSelector:, like so:Objective-C:[scrollView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];In Swift, you don't get that runtime access, so you have to actually handle the iteration yourself.Swift:A concise version, from here:scrollview.subviews.map{ $0.removeFromSuperview()}A more descriptive way to do this (from here) assumes scrollview.subviews:let subviews = self.scrollView.subviews for subview in subviews{ subview.removeFromSuperview()} I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too. 
Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to o…

Is there a way to remove the separator line from a UITableView?

You can do this with the UITableView property separatorStyle. Make sure the property is set to UITableViewCellSeparatorStyleNone and you're set.Obj-Cself.tableView.separatorStyle =UITableViewCellSeparatorStyleNoneIn SwifttableView.separatorStyle =.NoneI guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too. 

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.
This article is related to

iPad,iPhone,iPhone Resources,iPhone Articles,iPhone Development,iPhone Game Development,iPhone Turorial,Mo…

iOS - How to get device make and model?

EITHER try this library: http://github.com/erica/uidevice-extension/ (by Erica Sadun).

(Sample Code):
[[UIDevice currentDevice] platformType]   // ex: UIDevice4GiPhone
[[UIDevice currentDevice] platformString] // ex: @"iPhone 4G"
OR You can use this method:

You can get the device model number using uname from sys/utsname.h. For example:

#import <sys/utsname.h> // import it in your header or implementation file.
NSString* deviceName()
{
    struct utsname systemInfo;
    uname(&systemInfo);
    return [NSString stringWithCString:systemInfo.machine
                              encoding:NSUTF8StringEncoding];
}
The result should be:

@"i386"      on 32-bit Simulator
@"x86_64"    on 64-bit Simulator
@"iPod1,1"   on iPod Touch
@"iPod2,1"   on iPod Touch Second Generation
@"iPod3,1"   on iPod Touch Third Generation
@"iPod4,1"   on iPod Touch Fourth Generation
@"iPod7,1"   on iPod Touch 6th Generation
@"iPhone1,1" …

iPhone : Add animated Gif image in Iphone UIImageView in Objective c

If you have a gif image and you want to show it in UIImageView, then one method is to split all images from gif and use startAnimation method of UIImageView.
To split the gif, you can use this command
convert +adjoin loading.gif out%d.gifAfter you get all images, you can use following code to display these in a UIImageView,

UIImageView* animatedImageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
animatedImageView.animationImages = [NSArray arrayWithObjects:    
                               [UIImage imageNamed:@"image1.gif"],
                               [UIImage imageNamed:@"image2.gif"],
                               [UIImage imageNamed:@"image3.gif"],
                               [UIImage imageNamed:@"image4.gif"], nil];
animatedImageView.animationDuration = 1.0f;
animatedImageView.animationRepeatCount = 0;
[animatedImageView startAnimating];
[self.view addSubview: animatedImageView];
I guess you came to this post by searching similar …

LIST THE AVAILABLE COLLATIONS ON A MICROSOFT SQL SERVER

The following T-SQL code will generate a list of supported collations on your server.SELECT name, description FROM ::fn_helpcollations();I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too. Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.

iPhone : How to insert utf-8 mb4 character(emoji in ios5) in mysql?

4 byte Unicode characters aren't yet widely used, so not every application out there fully supports them. MySQL 5.5 works fine with 4 byte characters when properly configured – check if your other components can work with them as well.

Here's a few other things to check out:
Make sure all your tables' default character sets and text fields are converted to utf8mb4, in addition to setting the client & server character sets, e.g. ALTER TABLE mytable charset=utf8mb4, MODIFY COLUMN textfield1 VARCHAR(255) CHARACTER SET utf8mb4,MODIFY COLUMN textfield2 VARCHAR(255) CHARACTER SET utf8mb4; and so on.​ ​ If your data is already in the utf8 character set, it should convert to utf8mb4 in place without any problems. As always, back up your data before trying!Also make sure your app layer sets its database connections' character set to utf8mb4. Double-check this is actually happening – if you're running an older version of your chosen framework's mysql client library, it …

How to access website hosted on IIS of a virtual machine?

If you set the virtual addaptor to bridged mode this will give the virtual machine an IP address from your DHCP server (if you have one). try giving the host a static IP of 192.168.2.2 and the guest 192.168.2.3 (subnet mask 255.255.255.0) and see if you can ping between them. Also note bridge mode is not the same as host-only so you will need to have it connected to a network for this to work.
I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.
Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect …

How to create a simple 'EqualityComparer' using a lamba expression

What about a throw away IEqualityComparer generic class ?
publicclassThrowAwayEqualityComparer<T>:IEqualityComparer<T>{Func<T, T, bool> comparer;publicThrowAwayEqualityComparer<T>(Func<T, T, bool> comparer){this.comparer = comparer;}public bool Equals(T a, T b){return comparer(a, b);}publicintGetHashCode(T a){return a.GetHashCode();}}So now you can use Distinct.
var distinctImages

SQL to UPDATE and REPLACE part of a string

If you have a table with one field as string and you want to replace a part of string in all rows then use this query
UPDATE dbo.xxx SET Value = REPLACE(Value,'123\', '456')WHERE ID <=4 ​Here dbo.xxx is the name of table and value is the column which ​you want to replace. In this case, it will replace all 123 with 456.
I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too. 

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.

Ajax Not working in IOS 9.0 Cordova

As far as i understood the whole ATS (App Transport Security - iOS 9) thing, the recommended method from area28 should not be the one you're using inside an application.

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key><true/>
</dict>
This will allow all external requests to every domain what is definitively not the way you should use it. In my opinion you should define a new <dict> inside your info.plist and add this code to it (to edit the info.plist you can just use a normal text editor like sublime text etc.):

<key>NSAppTransportSecurity</key>
    <dict>
        <key>NSExceptionDomains</key>
        <dict>
            <key>domain.tld</key>
            <dict>
                <key>NSIncludesSubdomains</key>
                <true/>
                <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
                <true/>
    …

Apple : This certificate has an invalid issuer keychain

To fix this issue, Download https://developer.apple.com/certificationauthority/AppleWWDRCA.cer and double-click to install to Keychain.
Select "View" -> "Show Expired Certificates" in Keychain app.
Remove Apple Worldwide Developer Relations Certificate Authority certificates from "login" tab and "System" tab in Keychain app.
Here is what apple says,
Thanks for bringing this to the attention of the community and apologies for the issues you've been having. This issue stems from having a copy of the expired WWDR Intermediate certificate in both your System and Login keychains. To resolve the issue, you should first download and install the new WWDR intermediate certificate (by double-clicking on the file). Next, in the Keychain Access application, select the System keychain. Make sure to select "Show Expired Certificates" in the View menu and then delete the expired version of the Apple Worldwide Developer Relations Certificate Authori…

Lover app for Love day

Lover app for Love day for iPhone.
Play Tic Tac Toe with your love one and check who has more love.
Just download and start making love fun with your lovers and friends.
Very easy to play. 

Classic Love game.
Download from here.
View on App Store