Showing posts with label Iphone. Show all posts
Showing posts with label Iphone. Show all posts

Wednesday, 3 February 2016

ENABLE_BITCODE in xcode 7


bitcoin.jpg

Bitcode refers to an intermediate representation of a compiled program. The installation of iOS, tvOS, and watchOS apps by tailoring app delivery to the capabilities of the user’s particular device. Apple called this optimization,"app thinning". Note: Sliced apps are supported on devices running 9.0 and later; otherwise, the App Store delivers universal apps to customers. If you came across error like this:-
You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

To view more about How to enable Bitcoin in Xcode-7 visit Findnerd.

Also visit Findnerd to read and post tech blogs and can also Ask tech Query over Findnerd.

Thursday, 6 August 2015

How to add a Podfile in your Project

Below is the step-wise process for integrating a Podfile easily in your Application.
  1. Open Terminal
  2. Change the directory in Terminal to the location where your Xcode project resides.
  3. When you reach to the desired project location in which you want to add a PodFile. You can create an empty file by using the command “touch Podfile”.
  4. Then by using “open Podfile” command you can open the file you have created before and then add the desired podfile to that and close the window.
To read this full blog about Integrating a Podfile in a Project visit FindNerd.
FindNerd is a social platform for tech nerds to share knowledge by posting blogs, forums on web development along with job freelancing & project management feature.

Friday, 15 May 2015

Autoplay media files in UIWebView in IOS

When displaying media content using HTML5 in a web view on IOS the autoplay functionality does not work.
To enable to web view to autoplay the media (if coded in HTML to autoplay) you need to add a line of code in your IOS application as explained.
Let's say you have a webview object declared as in line below.
  1. UIWebView *videoView;
Then you need to add the code after initializing the webview as below.
  1. videoView.mediaPlaybackRequiresUserAction = NO;
  2. videoView.allowsInlineMediaPlayback = YES
This forces the video/audio to autoplay in UIWebView if directed in HTML code.

For such more Blogs you can visit to http://findnerd.com/NerdDigest

Friday, 8 May 2015

How to get sub strings from a string using Regular Expression

Hi, The below code is to get sub-strings from a string. You are going to love this below code which is very simple but very effective. I have used regular expression to get the sub strings.
  1. NSString *strTest = @"Hii how are you doing @Ravi , how do u do @Kiran where are you @Varun";
  2. NSError *error;
  3. NSRegularExpression *exp =[NSRegularExpression regularExpressionWithPattern:@"@[^ ]*" options:NSRegularExpressionCaseInsensitive error:&error];
  4. NSArray *s1= [exp matchesInString:strTest options:NSMatchingReportCompletion range:NSMakeRange(0, [strTest length]) ];
  5. [s1 enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
  6. NSTextCheckingResult *result = obj;
  7. NSString *str = [strTest substringWithRange:result.range];
  8. NSLog(@"str %@",str);
  9. }];

For such more Blogs you can visit to http://findnerd.com/NerdDigest

Thursday, 7 May 2015

Save the other Object in array using For loop










To add the object in array in for Loop we have several methods: first we can have to simply add those objects to the array then we can add them using for loop in array..... **IN example:** we have a simple object *object that we added 3 times at diffrent index postion in array(**mutArray)..** And other method is to add the object from another array: for that we accessed the each object at current index from the array and added that to the another array(**myMutableArray**)...
  1. NSMutableArray *mutArray=[[NSMutableArray alloc]init];
  2. for(int i=0;i<=2;i++)
  3. {
  4. NSString *object=@"Hello";
  5. [mutArray addObject:object];
  6. }
  7. NSLog(@"Mutable Array==%@",mutArray);
  8. //if the object are in other array then
  9. NSArray *objArray=[[NSArray alloc]initWithObjects:@"1",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10",nil];
  10. NSLog(@"obje==%@",objArray);
  11. NSMutableArray *myMutableArray=[[NSMutableArray alloc]init];;
  12. for(int index=0;index<objArray.count;index++)
  13. {
  14. [myMutableArray addObject:[objArray objectAtIndex:index]];
  15. }
  16. NSLog(@"myMutable Array==%@",myMutableArray);

For such more Blogs you can visit to http://findnerd.com/NerdDigest