Τρίτη, 17 Δεκεμβρίου 2013

Flesky Keyboard (for developers also)

http://vimeo.com/75453371

Get Fleksy SDK for your iOS app

Fleksy is the first keyboard app to arrive on the iOS platform. If you are an iOS developer you can now choose to integrate Fleksy’s SDK as an additional keyboard in your app.
Fleksy’s award winning keyboard has over half a million users on iOS already, using our stand-alone app to input text and send it into other apps.
Up until now, iOS limitations made it impossible to replace the default keyboard on iOS devices.
Integrating the Fleksy SDK means that users can now type with Fleksy’s keyboarddirectly in your app. 


Κυριακή, 15 Δεκεμβρίου 2013

11 Things You Must Know When Starting Out in iOS/Mac Development (copy - paste)


From a good article in Gibbon (http://www.appdesignvault.com/start-advice/
  1. Don't expect overnight success - Tweet this
  2. It's never been easier to make amazing apps, if you are considering it: go for it!
  3. Don't target a niche that will only pay 99c for your app.
  4. Hire a designer
  5. Don't lose faith, take more risks!
  6. Give back. The fastest way to learn is by openly sharing and discussing ( Asymco.comben-evans.com and listening to The Critical Path.)
  7. "Don't believe everything you think."Don't fall in love with your ideas. Always look for ways to prove yourself wrong
  8. Don't build an app thinking you will find an audience later, find the audience first and then build apps to meet their needs
  9. For this to be an enjoyable living you need the enjoy the process and people involved.
  10. Sometimes having less features can be your biggest competitive advantage
  11. Don't be afraid to meet new people. Work to overcome your introversion. 

CocoaPods - NSScreencast - NSHipster


https://gibbon.co/pinda/ios-development/13-things-you-must-know-when-starting-out-in-iosma?playlist=dfb846a8-8d94-4e3b-9fc0-647853072aa3
Mattt Thompson
Creator of AFNetworking & NSHipster💬💬💬
  • It's never been easier to make amazing apps, if you are considering it: go for it!
13 Things You Must Know When Starting Out in iOS/Mac DevelopmentWhen I first started iOS, I had been a Ruby & Rails programmer for about 4 years. I definitely spent a lot of time grappling with the language syntax, and trying to get a handle on all of the system frameworks. Back then, tutorials for basic tasks were sparse, and there were almost no open source projects to speak of. I had to rely on Apple's sample code and shear determination to get anything to work.
But still, just the novelty of being able to create something for the iPhone was enough to make everything worth it. These days, I'm happy to say that an iOS developer starting out today has dozens of great resources and hundreds of open source libraries available at their disposal. For tutorials and sample code, I heartily recommend Ray Wenderlich's site &NSScreencast. For anyone wanting to learn about more advanced topics, I write about obscure parts of Objective-C and Cocoa every week onNSHipster.
As far as open source, CocoaPods is absolutely essential. Not only does CocoaPods make managing dependencies effortless, but it's become an amazing tool for discovering new libraries. So much has changed since I first started out. It's never been easier to get started and make amazing apps, so my advice to anyone starting out or considering iOS development is simple: go for it!

Σάββατο, 26 Οκτωβρίου 2013

2013 - Octobre Keynotes

Spotlight:

Maverick

  • Use Gpu power for cpu reasons
  • memory compress
  • iBook
  • tag on files
MacBook pro 
  •  % faster
  • 3x faster wifi
  • thuderbolt 2

GaragBand
  • free
  • drumer

iPad
  • 20% thiner
  • 1 pound 
  • A7 cpu
  • 81% usage 
  • 72% faster form the original FIRST iPad (2x faster from previus gen)
tha's all 

Κυριακή, 26 Μαΐου 2013

ios Xcode4 - Core Data: How to enable SQL Debuggin

source stackoverflow

You should be looking at the same place you get NSLOGS
And you should Go to Product -> Edit Scheme -> Then from the left panel select Run YOURAPP.app and go to the main panel's Arguments Tab.
There you can add an Argument Passed On Launch.
You should add -com.apple.CoreData.SQLDebug 1
Press OK and your are all set.
The key here is to edit the scheme you will be using for testing

Σάββατο, 25 Μαΐου 2013

Preparing my first apple store application for upload - Upload my first application


Fast notes:)

  • Use the build for testing to see possible trunk code you left behind!
  • Ensure that you applications is not memory leaking
    • run Product - Profile - Leaking to check your application for possible memory leaks
  • To protect your app from being compromised by a hacker who might damage the user’s system, you give permissions, known as entitlements, to your app to perform specific functions. An entitlement is a key-value pair whose value you can set to specify a capability or security permission. This chapter describes entitlements you configure in your Xcode project for certain technologies supported by the store. Refer to Entitlement Key Reference for a complete list of app entitlements.
    To enable entitlements
    1. In Xcode, select the target in the project editor.
    2. Select the Summary tab and scroll down to the Entitlements section.
  • create InfoPlist.string to change the name of the application shown below the app icon.
    • "CFBundleDisplayName" = "dfasdf";
    • "CFBundleName" = "assfasdfasfd";
  • splash screens with localizations
  • Make a Provisioning Profile that is for Developer
    • click Certificates - create new (one for distribution). You will need to follow the instrunctions (create a keypair from keychain etc). When you finish a new Distribution Certificate must be valid. Download it and install it on your xCode or refresh the provisioning at xCode to auto-download it. 
    • On identifiers probably you have allready an IDs. A Name-ID pair example name: Learn and ID * means that with the identifiers Learn you can develop every named application you want. The applications don't have in real names but have bundles IDs. If you want the identifiers ID to be specific to only one application that you are developing then write in reverse the SAME bundle you have on your application.
    • On project make the Bundle identifier the same with the ID identifier!
  • Build your project with distribution sign
    • Select the project.
    • Click Build Settings.
    • Click All.
    • Type Code Signing in the search field in the Build Settings pane of the project editor.
    • From the Code Signing Identity pop-up menu, in the iOS Team Provisioning Profile section, choose the certificate that begins with “iPhone Developer:” followed by your name.
  • making the binary 
    • Find the file ending in ".app" in the Products folder of your application in Xcode. Right-click on it and choose Show In Finder. From there, right-click again and choose Compress.
      The resulting zipped file is the binary of your iphone application.
  • iTune Connect: manage your applications (lang - localizations  - see downloads - pricing etc).
    • you will need to have the proper icons 
    • create 512x512 and 1024 x1024 icons for shopt with names iTunesArtwork.png and iTunesArtwork@2x.png
    • take screenshots screenshots
  • create a new application at iTune Connect: (select the default lang - same with as your project is set). You will localize the all files later. 
  • After you take name and other staffs you have the yellow light (ready to upload)Some times you need first press the view Details below and click on be ready to upload to be really ready. 
  • use the Application Loader to upload the binary you made above. If no problem exist your application will be upload. 
  • Localizing the other data inside the  iTuneConnect  (click View Details on the app)
 “Localizing Metadata, Keywords, and Screenshots


Cross you fingers and i'm sure that soon apple you will aprove your app.


good luck



Last edit 26/5/2013

Τετάρτη, 15 Μαΐου 2013

LOCALIZATION - an ios application

apple instructions here

Below is instrunctions from the book The Big Nerd Ranch Guide (3rd Edition)


Internationalization Using NSLocale:

NSString * currencySymbol = [[NSLocale currentLocale] objectForKey: NSLocaleCurrencySymbol];
[ aLabel setText: [NSString stringWithFormat:@"%@", currencySymbol]];

Localizing Resources: 

  • These resources are organized into language-specific directories, known as lproj directories
  • add a language in the project setting first!
  • Click on an .xib file
  • open the file inspector
  • find the section Localization and click the + button at the bottom.  (this creates an lang.lproj folder and adds a copy of aaa.xib to it. 
  • Tsanslate localized files yourself!
  • Instead! you can use a command-line tool named ibtool to get the strings from your native language XIB file into a file. Then, you can trasnlate thses strings and create a new XIB file for each language. 
    • open terminal.app (Applications/Uitilites)
    • cd (Drag the en.lproj folder's icon from the Finder onto the Terminal window)
    • cd /iphone/myappication/application/en.lproj
    • ibtool --export-strings-file ~/Desktop/MyViewController.strings MyViewController.xib (this will create a DetailViewController.strings files on your desktop that contains all of the strings in your XIB file. 
    • open the file , transalate the texts to greek version. Save this new greek file. 
    • In terminal enter: ibtool --import-strings-file ~/Desktop/MyViewController.strings --write
    • ibtool --import-strings-file ~/Desktop/MyViewController.strings --write /iphone/myappication/application/gr.lproj/MyViewControoler.xib /iphone/myappication/application/en.lproj/MyViewControoler.xib
    • This command says Create MyViewController.xib in gr.lproj from MyViewController.xib in en.lproj, and then replace all of the strings with the values from MyViewController.strings.
    • Ingore the warnings from ibtools about GSCapabilities. 
    • Open the MyViewController.xib (greek) in Xcode. This XIB file is now localized to Greek. 

To test DELETE the application from your device or simulator. Then choose Clean, Build.
Change the language settings on the device (example to Greece) to see the effect. 

NSLocalizedString and Strings Tables
Fast review: 

  • Replace the strings you want to be transalate with NSString *translatedString = NSLocalizedString (@"Hello!", @"The greeting for the user");
  • At terminal run genstrings MyViewController.m to extract the above strings
  • with mouse put the Localizable.strings into your project
  • Localize from file inspector teh Localizable.strings. Add you langs also. 
  • click on lang version of Localizable.string you prefer and change the strings after the = into your lang.
  • clean - build - fun. 
Analytical:
For dynamically created NSStrings instances you must create a strings table. A strings table is a file containing a list of key-value pairs for all of the strings that your application uses and their associated translations. It's a resource file that you add to your application,.
Whenever you have a string in your code like @"My text", to internationalize this, replace literal strings with the function NSLocalizedString
NSString *translatedString = NSLocalizedString (@"Hello!", @"The greeting for the user");

Once you have a file that has been internationalized with the NSLocalizedString function,  you can generate strings tables with a command-line application. 
Open Terminal.app and navigate to the location of MyViewController.m The command will look like this: 
  • cd /iphone/Myapplication/Myapplication/
  • genstrings MyViewController.m
This creates a file named Localizable.strings in the same directory as MyViewController.m Drag this file into the project navigator. When the application is compiled, this resource will be copied into the  main bundle. 

Open the Localizable.strings file inn the editor area (reinterpet in Unicode (UTF-16)-utilitie-file inspector Text Settings - Text Encoding - Unicode )) if any problem. 
Now localize ti like the above XIB file in the first section of this post. Select the file in the project navigator an dclick the plus button in the utilities area. Add the Greek localization and then open the Greek version of Localizable.strings.  The string on the lefthand side is the key that is  passed to the NSLocalizedString function and the string on the righthand side is what is returned. Change the text as you want. 

build and run.  (better first delete the application, clean your project and rebuild. 

Κυριακή, 12 Μαΐου 2013

how to use uisegment control


 source here:

- (IBAction)segmentSwitch:(id)sender {
  UISegmentedControl *segmentedControl = (UISegmentedControl *) sender;
  NSInteger selectedSegment = segmentedControl.selectedSegmentIndex;

  if (selectedSegment == 0) {
    //toggle the correct view to be visible
    [firstView setHidden:NO];
    [secondView setHidden:YES];
  }
  else{
    //toggle the correct view to be visible
    [firstView setHidden:YES];
    [secondView setHidden:NO];
  }
}

Transform UIImage into Black'n'White image



source here:


- (UIImage *)getBlackAndWhiteVersionOfImage:(UIImage *)anImage {
 UIImage *newImage;
 
 if (anImage) {
  CGColorSpaceRef colorSapce = CGColorSpaceCreateDeviceGray();
  CGContextRef context = CGBitmapContextCreate(nil, anImage.size.width * anImage.scale, anImage.size.height * anImage.scale, 8, anImage.size.width * anImage.scale, colorSapce, kCGImageAlphaNone);
  CGContextSetInterpolationQuality(context, kCGInterpolationHigh);
  CGContextSetShouldAntialias(context, NO);
  CGContextDrawImage(context, CGRectMake(0, 0, anImage.size.width, anImage.size.height), [anImage CGImage]);
  
  CGImageRef bwImage = CGBitmapContextCreateImage(context);
  CGContextRelease(context);
  CGColorSpaceRelease(colorSapce);
  
  UIImage *resultImage = [UIImage imageWithCGImage:bwImage];
  CGImageRelease(bwImage);
  
  UIGraphicsBeginImageContextWithOptions(anImage.size, NO, anImage.scale);
  [resultImage drawInRect:CGRectMake(0.0, 0.0, anImage.size.width, anImage.size.height)];
  newImage = UIGraphicsGetImageFromCurrentImageContext();
  UIGraphicsEndImageContext();
 }
 
 return newImage;
}

uiimage compress


- (UIImage*)imageWithImage:(UIImage*)image
              scaledToSize:(CGSize)newSize;
{
    UIGraphicsBeginImageContext( newSize );
    [image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
    UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    return newImage;
}


CGRect rect = CGRectMake(0.0, 0.0, 480, 720);
image = [self imageWithImage:image scaledToSize:rect.size];


480x720 are printable and near to 0.8MB