2021-01-01ãã1å¹´éã®è¨äºä¸è¦§
ä»åã¯Androidã®ã¬ã¤ã¢ã¦ãä½ææã«ä½¿ããã¼ã«å±æ§ã«ã¤ãã¦æ¸ãã¦ãããã¨æãã¾ã ãã¼ã«å±æ§ã¯ä¸»ã«ã¬ã¤ã¢ã¦ãã®ãã¬ãã¥ã¼ç¢ºèªã§ä½¿ãåå空éã§ã
Qiitaã®Android Advent Calendar 2021ã®23æ¥ç®ã®è¨äºã§ã ä»ã®æ¹ãç´ æ´ãããè¨äºãæ稿ãã¦ããã®ã§ããã²ãã¡ãããã覧ãã ããï¼ ä»åã¯CardViewã®ã«ã«ã¼ã»ã«è¡¨ç¤ºã«ã¤ãã¦ã§ã ã«ã«ã¼ã»ã«è¡¨ç¤ºã¨ã¯æ¨ªã«ã¹ã©ã¤ããã¦æ¬¡ã®ãã¼ã¿ã表示ããããã®ã§ã ä¸è¨ã®â¦
iOSDC Japan 2021 ã«åå ãã¦ããã®ã§ãããã°ã«ãããã¨æãã¾ã iosdc.jp iOSDC Japanã¨ã¯ï¼ iOSDC Japan 2021ã¯iOSé¢é£æè¡ãã³ã¢ã®ãã¼ãã¨ããã½ããã¦ã§ã¢æè¡è ã®ããã®ãªã³ã©ã¤ã³ã«ã³ãã¡ã¬ã³ã¹ã§ãã æ¥æ¬ä¸ãä¸çä¸ããå ¬åããã100æ¬ãè¶ ããç¥â¦
ä»åã¯Callkitã«ã¤ãã¦ã§ã Callkitã¯ä¸è¨ã®ãããªiPhoneæ¨æºã®çä¿¡ç»é¢ã表示ãããæ©è½ã§ããç»é¢ãOFFã®ç¶æ ã§ããã°ãã¹ã©ã¤ããã¦å¿çããç»é¢ã表示ããã¾ããã¾ããçä¿¡å±¥æ´ã«ããã¼ã¿ãæ®ãã¾ã SkypeãLINEãªã©ã§é»è©±ããããã¨ãã«ãçä¿¡æã«åãâ¦
ãã¤ãéãGitHubã«pushãããã¨ããããçªç¶ã¨ã©ã¼ãçºçããããã«ãªãã¾ããã fatal: unable to access 'https://github.com/ã¦ã¼ã¶ã¼å/ãªãã¸ããªå.git/': The requested URL returned error: 403 ãªãã¸ããªåã¯åã£ã¦ãããããªãã ããï¼ sshæ¥ç¶â¦
ä»åã¯UIViewã®è¡¨ç¤ºã«ã¤ãã¦ã¾ã¨ãããã¨æãã¾ãã AutoLayoutãå¹ããªãã»Viewã®è¡¨ç¤ºä½ç½®ãããããã»è¡¨ç¤ºãããªãã»ç»é¢è¡¨ç¤ºã¾ã§ãé ããã¨ãå®è£ ãã¦ããä¸ã§1度ã¯çµé¨ã¯ããã¨æãã¾ãã ãã®ãããªåé¡ã¯ãViewã®è¡¨ç¤ºã®æµããç解ããã«éçºãã¦ãããâ¦
kotlinã«ã¯ã¹ã³ã¼ãé¢æ°ã¨ãããã®ãããã¾ãã ããã¤ã³ã¹ã¿ã³ã¹ã«å¯¾ãã¦ãé£ç¶ãã¦å¦çããããããªå ´åãã¹ã³ã¼ãé¢æ°ã使ãã°ã³ã¼ããç°¡æ½ã«ãããã¨ãã§ãã¾ããï¼Lambaå½¢å¼ã§å¦çããããªãã¾ãï¼ ã¹ã³ã¼ãé¢æ°ã«ã¯letã»runã»withã»applyã»alsoã®ï¼ç¨®â¦
ä»åã¯Androidã®ããã»ã¹ãã¹ã¬ããã«ã¤ãã¦ã¾ã¨ãããã¨æãã¾ãã æè¿ã¯éåæå¦çã§Coroutine ãªã©ãåºã¦ãããããã§éåæå¦çãç°¡åã«ã§ããããã«ãªãã¾ããã ãã ãCoroutine ãªã©ãç解ããåã«ããã»ã¹ãã¹ã¬ããã«ã¤ãã¦ç解ããå¿ è¦ãããã¨æâ¦
ä»åã¯ãAndroidã§ãã«ãã®ã¿ã¼ã²ããåããè¡ãããã«ããã«ã¯ã©ããããããã®ããæ¸ãã¦ããã¾ãã ãã«ãã®ã¿ã¼ã²ããåãã¨ããã®ã¯éçºç°å¢ã¨æ¬çªç°å¢ãªã©åãå ãå¤ããã¨ããã¨ã§ãã ä¾ãã°ãéçºç°å¢ã§apkãåºåããããæ¬çªç°å¢ã§åºåãããã¨å¤â¦
ä»åã¯Custom URL Schemeã§ã¢ããªãèµ·åããæ¹æ³ãæ¸ãã¦ããããã¨æãã¾ãã iOSã§ã¯ã cm-app:// ã®ãããªãã¢ããªåºæã®Custom URL Schemeãå®è£ ãããã¨ã§ã ãªã³ã¯ãã¿ãããã¦ã¢ããªãèµ·åãããã¨ãã§ãã¾ãã( ãã£ã¼ããªã³ã¯ã¨ãè¨ãã¾ã) ãã£ã¼â¦
æ´æ°ãªããªãã§ããã»ã»ã»ã» å®æçã«ã¯æ´æ°ãããã¨æã£ã¦ãã¾ã ä»åã¯iOSã§ã®ã©ãã«ããã¹ãã®ã«ã¹ã¿ãã¤ãºã«ã¤ãã¦ã§ãã ããããããããã«ã©ãã«ã§è¨è¼ãã¦ããã¾ãããä¾ãã°ããã¿ã³ã®ããã¹ããªã©ãåæ§ã«ã«ã¹ã¿ãã¤ãºã§ãã¾ãã®ã§ãã²å¿ç¨ãã¦ã¿â¦
ä»åã¯ã©ã¤ã»ã³ã¹æ©è½ã«ã¤ãã¦ã§ãã OSSã®ã©ã¤ãã©ãªãiOSã®ã¢ããªã§å©ç¨ãã¦ããå ´åã使ç¨ããã©ã¤ãã©ãªã®ã©ã¤ã»ã³ã¹ããããã¹ãå ´æã«è¨è¼ããå¿ è¦ãããã¾ãã ã©ã¤ãã©ãªã追å ãã度ã«ããããæåã§æ´æ°ããã¨æéã«ãªãã®ã§ãããããCocoaPodsã®â¦
ä»åã¯ã©ã¤ãã©ãªãforkãã¦ä½¿ãæ¹æ³ã§ãã ãã¾ã使ããã¨ã¯ãªãã¨æãã¾ããã使ãããã©ã¤ãã©ãªãæ´æ°ãããã«æ©è½ã追å ããããã©ã§ããªãå ´åã«ä¸é¨ã«ã¹ã¿ãã¤ãºãã¦ä½¿ãããã«ä½¿ã£ãããã¾ãã ã¾ãã¯ä½¿ãããã©ã¤ãã©ãªãä¸è¨ãã¿ãããã¦ãforkãâ¦
ä»åã¯iOSã¢ããªã®ãã«ãã®ã¿ã¼ã²ããåãã«ã¤ãã¦è¨è¼ãããã¨æãã¾ãã ä¾ãã°ãéçºç°å¢ã¨æ¬çªç°å¢ã§å¦ç½®ãåãããå ´åãAPIã®URLãåãããå ´åãããã¨æãã¾ãã ãããªã¨ãã«ï¼ã¤ã®ããã¸ã§ã¯ãã§è¤æ°ã®ç°å¢ã管çããããã«ã¿ã¼ã²ããåããè¡ãã¾â¦
ä»åã¯å°ãã¿ã§ã ããã·ã¥éç¥ã許å¯ãã¦ãããã©ããç¥ãããã¨ãããã¾ãããï¼ ãããªã¨ãã«è¨±å¯ç¶æ³ã確èªããããã®å®è£ ã§ã if UIApplication.shared.isRegisteredForRemoteNotifications { print("許å¯ãã¦ãã") } else { print("許å¯ãã¦ããªã") }â¦
ä»åã¯apkãã¡ã¤ã«ãã¤ã³ã¹ãã¼ã«ããæ¹æ³ã«ã¤ãã¦ã§ã ãã¾ã«éçºä¸ã®ãã®ãapkãã¡ã¤ã«ã«æ¸¡ãã¨ãããã¨ããã¾ãããï¼ ããã¦ã渡ããããã®ãã¤ã³ã¹ãã¼ã«ãã¦åãã確èªãããã¨ã¯ããã¾ãããï¼ ä»åã¯ãããªã¨ãã«ã¤ã³ã¹ãã¼ã«ãããæ¹æ³ã§ã 大åæâ¦
ä»åã¯ããã·ã¥éç¥ã«ã¤ãã¦ã§ã ããã·ã¥éç¥ã¯ãã¼ã«ã«éç¥ã¨ãªã¢ã¼ãéç¥ãããã¾ãããä»åã¯ãªã¢ã¼ãéç¥ã«ã¤ãã¦ã§ã ç°¡åã«ãã¼ã«ã«éç¥ã¨ãªã¢ã¼ãéç¥ã®éãã説æããã¨ããã¼ã«ã«éç¥ã¯ã¢ããªåä½ã§ã¢ããªããã©ã¢ã°ã©ã¦ã³ã以å¤ãªãéç¥ã表示ãâ¦
iOSã®éçºã§ã¯å¿ é ã¨ãã£ã¦ãããããUITabBarControllerã¯ä½¿ãã¨æãã¾ã ä»åã¯ãããªUITabBarControllerã«ã¤ãã¦è¨è¼ãããã¨æãã¾ã UITabBarControllerã¯storyboardã§ä½æããæ¹æ³ã¨ã³ã¼ãã§å®è£ ããæ¹æ³ãããã®ã§ä¸¡æ¹èª¬æãããã¨æãã¾ãã(å人çâ¦
ä»åã¯Retrofitã®åºæ¬çãªä½¿ãæ¹ã«ã¤ãã¦æ¸ãããã¨æãã¾ãã Androidéçºã§APIé£æºãè¡ãå ´åã«å¿ ãã¨è¨ã£ã¦ããã»ã©ä½¿ãã¨æãã¾ãããã¾ã«ããã£ã¦ãã¾ãã®ã§ãã¾ã¨ããããã¨æãã¾ãã Retrofitã¯ãAPIããåå¾ããJSONãã¼ã¿ãããªãã¸ã§ã¯ãã«ãã¦ã¢â¦
ä»åã¯ããã·ã¥éç¥ã®ãã¹ãã«ã¤ãã¦æ¸ãã¾ãã ããã·ã¥éç¥ã®ãã¤ãã¼ãã¯ããã£ã¦ãã¦ãããã·ã¥éç¥ã®æ©è½ãã¾ã ãªãå ´åããã¾ãããï¼ æ¥åã§ãã¾ãã¾çºçãã¦ããã·ã¥éç¥ã®ãã¹ããã·ãã¥ã¬ã¼ã¿ã¼ã§ã§ãããã¨ãç¥ã£ãã®ã§æ¹æ³ãã¾ã¨ãããã¨æãã¾â¦
ãã°ããæ´æ°ãã¦ããªããã¡ã«å¹´ãè¶ãã¦ãã¾ãã¾ããããããã ããããã¯ãªãã¹ãæ´æ°ãã¦ããäºå®ã§ã ä»å¹´åã®è¨äºã¯UITableViewã§ã«ã¹ã¿ãã¤ãºãããã¼ã使ãæ¹æ³ã§ã UITableViewã§ã¯storyboardã§ä½æãããã¨ãã§ããã®ã§ãããä¸è¨ã®ããã«ãããã¼â¦