{"id":234439,"date":"2014-08-25T10:14:03","date_gmt":"2014-08-25T06:14:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=234439"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=234439","title":{"rendered":"<span class=\"post_title\">\u0417\u0430\u043f\u0443\u0441\u043a objective-c \u043a\u043e\u0434\u0430 \u043d\u0430 Android \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445<\/span>"},"content":{"rendered":"<div class=\"content html_format\">\n<h4>\u041d\u0430\u0447\u0430\u043b\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0438<\/h4>\n<p>  \u041f\u0440\u0438\u0448\u0435\u043b \u043c\u043d\u0435 \u043d\u0430 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 cocos2d. \u0418\u0433\u0440\u0430 \u0434\u043b\u044f \u0434\u0435\u0442\u0435\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0430\u0437\u043b\u044b \u0438 \u0443\u0447\u0438\u0442\u044c \u0441\u043b\u043e\u0432\u0430. \u0420\u0430\u0431\u043e\u0442\u0430 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430, \u043d\u043e \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u0430\u0441\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u043e \u043c\u0435\u043d\u044f \u043d\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u043d\u0435\u043a\u0430\u044f \u0434\u0435\u0432\u0443\u0448\u043a\u0430 \u0438\u0437 \u0418\u043d\u0434\u0438\u0438. \u0418 \u0442\u0443\u0442 \u0443 \u043c\u0435\u043d\u044f \u043d\u0430\u0447\u0430\u043b\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0432\u0435\u0441\u0435\u043b\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434. \u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043d\u0430 \u0447\u0442\u043e \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0438 \u0447\u0435\u043c \u0432\u0441\u0435 \u044d\u0442\u043e \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u043e\u0441\u044c, \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<\/p>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u043d\u0434\u043e\u043a\u043e\u0434 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u0435\u0441\u044c \u0434\u0435\u043d\u044c<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">\/\/SelectPuzzle.h - (void)imagePickerController:(UIImagePickerController *)pickerView didFinishPickingMediaWithInfo:(NSDictionary *)info {      [[NSUserDefaults standardUserDefaults]setObject:nil forKey:@&quot;cameraImage&quot;];              UIImage *resiZedImage=[info objectForKey:UIImagePickerControllerOriginalImage];     UIInterfaceOrientation interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation];     if (UIInterfaceOrientationIsPortrait(interfaceOrientation))     {         isportrait=YES;         resiZedImage=[self ImageResize:resiZedImage];     }     else     {         isportrait=NO;         resiZedImage=[self imageByCropping:resiZedImage toRect:CGRectMake(800,300,1006,1258)];     }                  [[NSUserDefaults standardUserDefaults]setInteger:preDefined6 forKey:imageIndex];     [[NSUserDefaults standardUserDefaults]setObject:[NSData dataWithData:UIImagePNGRepresentation(resiZedImage)] forKey:@&quot;cameraImage&quot;];          [[NSUserDefaults standardUserDefaults]synchronize];     [self performSelector:@selector(dismissCameraView:) withObject:pickerView afterDelay:1.0];          [[CCDirector sharedDirector]replaceScene:[PlayScene scene]];      }  \/\/PlayScene.m -(void)init{ \tself = [super init]; \tif(self){ \t\t\/\/... \t\t\/\/... \t\tcamera = YES; \t\tNSData* imageData = [[NSUserDefaults standardUserDefaults] objectForKey:@&quot;cameraImage&quot;]; \t\tUIImage* cameraImage = [[[UIImage alloc] initWithData:imageData]autorelease];   \t \t puzzleObject=[CCSprite spriteWithCGImage:cameraImage.CGImage key:nil];     \t\/\/...     \t\/\/... \t} return self; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u0441\u0442 \u043d\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c, \u0430 \u0441\u043e\u0432\u0441\u0435\u043c \u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435. <br \/>  \u0427\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0431\u044b\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u044b, \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0431\u0438\u043b\u0434 \u043f\u043e\u0434 \u0435\u0433\u043e Android \u0434\u0435\u0432\u0430\u0439\u0441. \u0414\u0430\u043b\u0435\u0435 \u0448\u0435\u043b \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u0434 cocos2d-x \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435. \u0420\u0435\u0448\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0443\u0436\u0435 \u043c\u043d\u0435 \u0438 \u043c\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 Apportable. <\/p>\n<h4>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0442\u0435\u043c\u0430<\/h4>\n<p>  \u041a\u0430\u043a \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442, Apportable SDK \u2014 \u044d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 xCode \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 iOS \u0438 Android \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u044d\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0438\u0433\u0440 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b\u0445 \u043d\u0430 cocos2d. C \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 Core \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<br \/>  \u041d\u0430\u0448\u0430 \u0438\u0433\u0440\u0430 \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c \u043a\u043e\u043a\u043e\u0441\u0435 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0434\u0432\u0443\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c UIKit \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b. <br \/>  \u041d\u0443 \u0447\u0442\u043e \u0436\u0435. \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c. <\/p>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2014 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c SDK \u043d\u0430 Mac. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u0441\u043b\u0435\u0434\u0443\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c \u043d\u0430 \u0441\u0430\u0439\u0442\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 <\/p>\n<pre><code class=\"bash\">   (echo; echo PATH=~\/.apportable\/SDK\/bin:$PATH) &gt;&gt; ~\/.bash_profile; source ~\/.bash_profile <\/code><\/pre>\n<p>  SDK \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 2\u0433\u0431 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e xCode 5.<\/p>\n<p>  \u041f\u043e\u043a\u0430 \u0432\u0441\u0435 \u044d\u0442\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043a\u043e\u0434.<br \/>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0440\u0435\u0436\u0438\u043c \u044d\u043c\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u043a\u0440\u0430\u043d\u0430. \u0422\u0443\u0442 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430. <br \/>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<br \/>  UIScreenIPhone3GEmulationMode \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0443 \u043e\u0442 retina \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u0420\u0430\u0437\u043c\u0435\u0440 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 320px\/480px, scale \u2014 1.0<br \/>  UIScreenScaledAspectFitEmulationMode \u2014 \u0440\u0430\u0441\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u0442 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0438\u0438 \u0441 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0430 Android \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043d\u0435 retina \u0433\u0440\u0430\u0444\u0438\u043a\u0443. <br \/>  UIScreenBestEmulatedMode \u2014 \u0440\u0430\u0441\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u0442 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0438\u0438 \u0441 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0430 Android \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u0433\u0440\u0430\u0444\u0438\u043a\u0443. \u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 iPhone \u0438 iPad \u044d\u043a\u0440\u0430\u043d\u043e\u0432. \u0418\u043d\u0430\u0447\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 best.<\/p>\n<pre><code class=\"objectivec\">int main(int argc, char *argv[]) {          @autoreleasepool { #ifdef ANDROID         [UIScreen mainScreen].currentMode = [UIScreenMode emulatedMode:UIScreenAspectFitEmulationMode]; #endif         int retVal = UIApplicationMain(argc, argv, nil, @&quot;AppController&quot;);         return retVal;     } } <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">typedef NS_ENUM(NSUInteger, UIScreenEmulationMode) {     UIScreenIPhone3GEmulationMode,     UIScreenIPhone4EmulationMode,     UIScreenIPhone5EmulationMode,     UIScreenIPadEmulationMode,     UIScreenIPadRetinaEmulationMode,     UIScreenAspectFitEmulationMode,     UIScreenScaledAspectFitEmulationMode,     UIScreenBestEmulationMode,     UIScreenBestEmulatedMode = UIScreenBestEmulationMode,     UIScreenNativeMode,     UIScreenNativeRetinaMode,     UIScreenBestNativeMode, }; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0447\u0442\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u044b\u0432\u0430\u0442\u044c \u2014 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.  <\/p>\n<pre><code class=\"objectivec\">[item setPosition:ccp(400, 600)];  <\/code><\/pre>\n<p>  \u043d\u0430   <\/p>\n<pre><code class=\"objectivec\">[item setPosition:ccp(puzzle.contentSize.width * 0.2, puzzle.contentSize.height * 0.772)]; <\/code><\/pre>\n<p>  \u0422\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043f\u0440\u0438 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0439. <\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0438 \u0432\u0432\u0435\u0441\u0442\u0438:   <\/p>\n<pre><code class=\"bash\">    apportable load <\/code><\/pre>\n<p>   \u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 apk \u0444\u0430\u0439\u043b, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442 \u0435\u0433\u043e \u043d\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442. \u0412 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435. \u041e\u043d \u0431\u044b\u0432\u0430\u0435\u0442 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430. \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432, \u043e\u043d\u0438 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b. \u041e\u0434\u043d\u0430\u043a\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043a\u043e\u0433\u0434\u0430 apportable \u043d\u0435 \u0432\u0438\u0434\u0438\u0442 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0434\u0435\u0432\u0430\u0439\u0441. \u041d\u0430 \u043e\u0444\u0438\u0441\u0435 \u0438\u0437 7 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0435 \u0441\u043c\u043e\u0433 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430 3.<br \/>   \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435? \u0412\u0441\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e. Apportable \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 apk \u0444\u0430\u0439\u043b \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e. \u0417\u043d\u0430\u0447\u0438\u0442 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0433\u0434\u0435-\u0442\u043e \u0435\u0441\u0442\u044c. \u0415\u0441\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u043e, \u0442\u043e \u0432\u043e\u0442 \u0437\u0434\u0435\u0441\u044c:   <\/p>\n<pre><code class=\"bash\"> \/Users\/username\/.apportable\/SDK\/Build\/android-armeabi-debug\/ProjectName  <\/code><\/pre>\n<p>   \u0412 \u044d\u0442\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u043b\u0435\u0436\u0438\u0442 apk \u0444\u0430\u0439\u043b \u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043a\u0438\u043d\u0443\u0442\u044c \u043d\u0430 \u0434\u0435\u0432\u0430\u0439\u0441 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Android File Transfer(\u0432 \u043c\u0430\u043a\u0435 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u043d\u0435\u043b\u044c\u0437\u044f \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043f\u0430\u043c\u044f\u0442\u0438 Android \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432). <\/p>\n<p>  \u0412\u0441\u0435? \u041f\u0440\u043e\u0444\u0438\u0442? \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u043d\u0435\u0442. <br \/>   \u0412\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0444\u043e\u0442\u043e\u043a\u0430\u043c\u0435\u0440\u043e\u0439. \u041a\u0430\u043c\u0435\u0440\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u0430\u0441\u044c, \u0434\u0435\u043b\u0430\u043b\u0430 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044e, \u043d\u043e \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043a\u043d\u043e\u043f\u043a\u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0430\u0434\u0430\u043b\u043e. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043d\u0435 \u0433\u0443\u0433\u043b\u0438\u043b\u0430\u0441\u044c \u0438 \u043e\u0431\u0435\u0449\u0430\u043b\u0430 \u043f\u0440\u0438\u043d\u0435\u0441\u0442\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043d\u043e\u2026 \u041f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0448\u043b\u0430 \u043e\u0442 \u043d\u0430\u0448\u0438\u0445 android \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432. \u042f \u0443\u0437\u043d\u0430\u043b, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u0438 \u043f\u0435\u0440\u043c\u0438\u0448\u0435\u043d\u044b.   <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0427\u0442\u043e \u0436\u0435 \u044d\u0442\u043e? \u0414\u043b\u044f iOS \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432<\/b><\/p>\n<div class=\"spoiler_text\"> \u0410\u043d\u0430\u043b\u043e\u0433 \u043d\u0430\u0448\u0435\u0433\u043e info.plist. \u041c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u0432\u0441\u0435 \u043f\u0440\u0430\u0432\u0430 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e.   <\/div>\n<\/div>\n<p>  \u0418 \u0442\u0430\u043a. \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0438\u043b\u0434\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e apportable, \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043f\u0430\u043f\u043a\u0430 ProjectName.aproj. \u0412 \u044d\u0442\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u043b\u0435\u0436\u0430\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f(\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0441\u0443\u0440\u0441\u044b).<br \/>  \u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0444\u0430\u0439\u043b configuration.json. \u0412 \u043d\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043b\u044f android. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u043c\u0438\u0448\u0435\u043d\u044b. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u043e\u0442\u043e\u043a\u0430\u043c\u0435\u0440\u044b \u043d\u0443\u0436\u043d\u044b \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c.<br \/>  \u0418 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438  <\/p>\n<pre><code class=\"javascript\">    &quot;FEATURES&quot;: [&quot;opengles2&quot;,&quot;landscape&quot;]<\/code><\/pre>\n<p>  \u043d\u0430  <\/p>\n<pre><code class=\"javascript\">    &quot;FEATURES&quot;: [&quot;opengles2&quot;,&quot;landscape&quot;,&quot;write_external_storage&quot;] <\/code><\/pre>\n<p>  \u0432\u043e\u043b\u0448\u0435\u0431\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0435\u0448\u0438\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441 \u0441 \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0438\u043c\u0435\u043d\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0430\u0439\u043b <i>strings.xml<\/i> \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0443 ProjectName\/java\/res\/values-[lang_description]<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">strings.xml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;resources&gt;     &lt;string name=&quot;app_name&quot;&gt;Localization name&lt;\/string&gt; &lt;\/resources&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0418 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 configuration.json:  <\/p>\n<pre><code class=\"javascript\">\/\/A list of java resource directories     &quot;java_res_dirs&quot;: [&quot;java\/res&quot;] <\/code><\/pre>\n<p>  \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a:<\/p>\n<ul>\n<li>\u0420\u0430\u043c\u0435\u0440\u043e\u0432 \u044d\u043a\u0440\u0430\u043d\u043e\u0432 \u0443 Android \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e, \u0438 \u043a\u043e\u0435-\u0433\u0434\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u0441\u0442\u0430\u0432\u043a\u0438:<br \/> \n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">#ifdef ANDROID             CGRect frame = [UIScreen mainScreen].applicationFrame;\/\/1.7031 - pad  1.778 - phone             CGFloat ratio = frame.size.height \/ frame.size.width;                       if (ratio &lt; 1.72)                 {                     x = 16;                 }                 else{                     x = 29;                 } #endif<\/code><\/pre>\n<\/div>\n<\/div>\n<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 configuration.json \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0444\u043b\u0430\u0433 \u00abportrait\u00bb, \u0430 Device Orientation \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 xCode \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u0442\u043e\u0438\u0442 \u0433\u0430\u043b\u043e\u0447\u043a\u0430 \u043d\u0430\u043f\u0440\u043e\u0442\u0438\u0432 \u00abPortrait\u00bb, \u0442\u043e \u043f\u043e\u0440\u0442\u0440\u0435\u0442\u043d\u0430\u044f \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u0443\u0434\u0435\u0442. \u0411\u0443\u0434\u044c\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b. <\/li>\n<li>\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f <a href=\"http:\/\/docs.apportable.com\/\">docs.apportable.com\/<\/a><\/li>\n<li>\u0412 Apportable \u0434\u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043c\u043d\u043e\u0433\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438. \u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u0430\u043b\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 \u044d\u0442\u043e\u043c. \u041d\u043e\u0432\u044b\u0435 .h \u0444\u0430\u0439\u043b\u044b \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0434\u043b\u044f android \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0435 <br \/>  \/Users\/username\/.apportable\/SDK\/sysroot\/System\/Library<\/li>\n<\/ul>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/234439\/\"> http:\/\/habrahabr.ru\/post\/234439\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">\n<h4>\u041d\u0430\u0447\u0430\u043b\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0438<\/h4>\n<p>  \u041f\u0440\u0438\u0448\u0435\u043b \u043c\u043d\u0435 \u043d\u0430 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 cocos2d. \u0418\u0433\u0440\u0430 \u0434\u043b\u044f \u0434\u0435\u0442\u0435\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0430\u0437\u043b\u044b \u0438 \u0443\u0447\u0438\u0442\u044c \u0441\u043b\u043e\u0432\u0430. \u0420\u0430\u0431\u043e\u0442\u0430 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430, \u043d\u043e \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u0430\u0441\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u043e \u043c\u0435\u043d\u044f \u043d\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u043d\u0435\u043a\u0430\u044f \u0434\u0435\u0432\u0443\u0448\u043a\u0430 \u0438\u0437 \u0418\u043d\u0434\u0438\u0438. \u0418 \u0442\u0443\u0442 \u0443 \u043c\u0435\u043d\u044f \u043d\u0430\u0447\u0430\u043b\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0432\u0435\u0441\u0435\u043b\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434. \u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043d\u0430 \u0447\u0442\u043e \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0438 \u0447\u0435\u043c \u0432\u0441\u0435 \u044d\u0442\u043e \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u043e\u0441\u044c, \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-234439","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/234439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=234439"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/234439\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=234439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=234439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=234439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}