ã¯ããã« ä»åã¯iOS13ã§æ°ãã«è¿½å ããã BackgroundTasks Framework ã«ã¤ãã¦è¦ã¦ããããã¨æãã¾ãã åºæ¬çã«ã¯ã WWDC2019åç»ã®ãAdvances in App Background Executionããè¦ãªããå®è·µãã¦ã¿ã¾ããã ã§ãããå¾®å¦ã«èºãã¨ããããã£ãã®ã§ã¡ã¢ã¨ãã¦æ®ãã¦ããããã¨æãã¾ãã BackgroundTasksã¨ã¯ ã¾ãã BackgroundTasks ã®èª¬æã§ãã BackgroundTasks ã¯iOS13ããå©ç¨ã§ããæ°ããFrameworkã«ãªãã¾ãã BackgroundTasks ã«ã¯å¤§ããåãã¦ä¸è¨2ã¤ã®APIãåå¨ãã¾ãã Background Processing Tasks Background App Refresh Tasks Background Processing Tasks Backgrou
iOSã¢ããªã±ã¼ã·ã§ã³éçº ãã®ç« ã¯ãiOSã¢ããªã±ã¼ã·ã§ã³éçºã«Bluetooth LEãæä¾ããCore Bluetoothãã¬ã¼ã ã¯ã¼ã¯ã解説ãã¾ãã Core Bluetoothãã¬ã¼ã ã¯ã¼ã¯ã¯ãiOSã¢ããªã±ã¼ã·ã§ã³ã«Bluetoot LEããã¤ã¹ã®çºè¦ãæ¥ç¶ã¨èªã¿æ¸ãã®æä½ãæä¾ãã¾ãããã®ãã¬ã¼ã ã¯ã¼ã¯ãã2ç« ã§è¿°ã¹ãBluetooth LEã®éä¿¡è¦æ ¼ãæ¯ãèããªã©ã®æè¡è©³ç´°ãé è½ãã¦æ½è±¡åããã®ã§ãã¢ããªã±ã¼ã·ã§ã³éçºè ã¯ã¢ããªã±ã¼ã·ã§ã³éçºã ãã«æ³¨åã§ãã¾ãã iOS5ã¨iOS6ã§ãCore Bluetothãã¬ã¼ã ã¯ã¼ã¯ã対å¿ããæ©è½ã大ããç°ãªãã¾ããiOS5ã¯ãBluetooth LEã®ã»ã³ãã©ã«ã¨ããå½¹å²ãæä¾ãã¾ããiOS6ã¯ãã»ã³ãã©ã«ã«å ãã¦ããªãã§ã©ã«ã¨ããå½¹å²ãæä¾ãã¾ããiOSã®ãã¼ã¸ã§ã³ãã¨ã®å¯¾å¿ããiOS5ããã³iOS6ã®ã¢ã¤ã³ã³ãç¯ã®ã¿ã¤ãã«ã«è¡¨
â» å®è£ /åä½ç¢ºèªç°å¢: Xcode 11 beta7 + iOS 13 beta 8 TL; DR iOS13 & iOS12ã§ä½ç½®æ å ±ãã常ã«è¨±å¯ããã¦ãããå ´åãInfo.plistã®å¤ã以ä¸ã®ããã«ãããã¨ã§é©åã«èª¬æã»èªå°ã§ããã NSLocationWhenInUseUsageDescription XXXã®å©ç¨ã«ã¯ããAppã®ä½¿ç¨ä¸ã¯è¨±å¯ããé¸æãã¦ãã ããã NSLocationAlwaysAndWhenInUseUsageDescription XXXã®å©ç¨ã«ã¯ãã常ã«è¨±å¯ããé¸æãã¦ãã ããã èæ¯ã¨æ¦è¦ iOS13ãã㯠CLLocationManager.requestAlwaysAuthorization() ãå®è¡ãã¦ããã常ã«è¨±å¯ããããã«åå¾ã§ããªãããã«ãªããã¢ã©ã¼ãã§ï¼åº¦è¨±å¯ãåå¾ããå¿ è¦ããã 詳細ã¯WWDCã®çºè¡¨å 容1ã解説è¨äº2 3ãåç § iOS1
var locationManager = CLLocationManager() locationManager.delegate = self locationManager.requestAlwaysAuthorization() ã¨ããéã«ã ã常ã«è¨±å¯ã ã使ç¨ä¸ã®ã¿è¨±å¯ã ã許å¯ããªãã ã®3ã¤ã®é¸æè¢ãæã¤ç¢ºèªãã¤ã¢ãã°ã表示ããã¦ãã¾ããã ãããiOS13ã§ã¯ã ã使ç¨ä¸ã®ã¿è¨±å¯ã ãä¸æçã«è¨±å¯ã ã許å¯ããªãã ã®3ã¤ã®é¸æè¢ã«å¤æ´ã¨ãªãã¾ããã ä¸è¦ããã¨ãã¢ããªéçºè ã«ã¨ã£ã¦è¾ãä»æ§ã«æããã®ã§ãããã常ã«è¨±å¯ãããªããªã£ãããã§ã¯ããã¾ããã ã常ã«è¨±å¯ããæ±ããã¿ã¤ãã³ã°ãå¤æ´ã«ãªã£ã ã¨ããã®ãæ£ãã解éã¨ãªãã¾ãã å ã¿ã«ãããã§ã使ç¨ä¸ã®ã¿è¨±å¯ããé¸æããå ´åã CLAuthorizationStatus ã¯å®ã¯ .authorizedAlways ã«ãª
çªç¶éããªããªãã¢ã·ã¹ã¿ã³ãã¨ãã£ã¿ã¼ Xcodeã§iOSã¢ããªã®éçºããã¦ãã¦ãStoryBoardãéãã¦ãUIButtonã®ã¢ã¯ã·ã§ã³ãã³ã¼ãã«ç¹ããããã«Assistant Editorãä½æ°ãªããç¹ã«æèãããæ®æ®µéãã«Xcodeä¸ã®ãã¡ã¤ã«ããAlt + ã¯ãªãã¯ãã§éããã¨ããã¨ãããæ®æ®µã¯ç»é¢ã縦ã«2ã¤ã«åå²ãããã®ã«ã常æã·ã³ã°ã«ã¨ãã£ã¿ã¼(ã¯ãªãã¯ãããã®ã ãã表示ããã)ã«ãªã£ã¦ãã¾ãã¾ãããããããã¤ãã®ãã°ã(ç¬)ã¯ãã¯ãã£ã¦ãã¨ã§ãXcodeã®åèµ·åãããã£ã¨æã£ã¦Macã®åèµ·åâ¦ããã·ã§ã¼ãã«ããã ãããç»é¢ã§è¡¨ç¤ºããããã®ããããã°ã¨ããããã¯åå²ã§ããã ããâ¦ãã¨ãå³ä¸ã®ãâããæ¼ããã«ããã Xibã®XMLã表示ãããã ãã§å ¨ã解決ãããç¦ã£ã¦ãã¾ããã 解決æ¹æ³ 以ä¸ç»åã®ãã¿ã³ãæ¼ãã ãã§ãããã ããã ãã«çè ã¯30å以ä¸æ©ã¿ã¾ãã(ã¬ã) ãã®åé¡ã«
Swift5ããªãªã¼ã¹ããã¾ãããã Swift5ã«ã¯ABIã®å®å®åãResultåã®Standard Library追å ãªã©æ§ã ãªè¿½å ã»å¤æ´ãããã¾ããã 次ã®URLã«ã¾ã¨ã¾ã£ãç¥Playgroundãããã®ã§ãã¿ããã¨ãªã人ã¯ãããããã¾ãããã https://github.com/twostraws/whats-new-in-swift-5-0 String Interpolationã使ã£ã¦NSAttributedStringãã©ãããã ãã®ä¸ã§String Interpolationã¨ããæ©è½ãããã¾ãã String Interpolationã®ä½¿ãæ¹ã¯ä¸è¨Playgroundãåç §ãã¦ãã ããã ãã®String Interpolationã使ãã¨ãã¡ããã¡ãNSAttributedStringã便å©ã«ãªãã¾ãã ä¸è¨ã«NSAttributedStringãã©ãããããã®
Env OS X ElCapitan 10.11.6 使ç¨ãããã¼ã« defaultsã¨ãplutilã¨ãPlistBuddyãªã©ãç¨æããã¦ãããã¼ã«ã«ãplistããããããã®ã¯è¤æ°ããããããããã®ä½¿ç¨ããç¨éã¯ä»¥ä¸ã®ãããªæãï¼ã ã¨æã£ã¦ããï¼ defaults: åè¨å®ãã¡ã¤ã«(Library/Preferences/*.plist)ãä½æã»ç·¨éãã plutil: plistã®ææ³ãã§ãã¯ã»xml,jsonã¸ã®ã³ã³ãã¼ãã»é²è¦§(ç·¨éãä¸å¿åºæ¥ããã©ãarrayãdictã®ä¸ã®å¤ã®ç·¨éãã§ããªãï¼) PlistBuddy: plistã®ä½æã»ç·¨éã»é²è¦§ ã¡ãªã¿ã«ã©ã£ãã®è¨äºã§PlistBuddyã¯ElCapitanãã使ç¨ã§ããªããã¨è¨è¼ããã¦ãã£ãããç¹ã«åé¡ãªã使ç¨åºæ¥ãã¿ãã
UIFileSharingEnabledãå®æ©å ã®ã¢ããªã§çæãããã¡ã¤ã«ãç°¡åã«PCã«åãè¾¼ãã¦ä¾¿å©ã§ãã ããUIFileSharingEnabledãYESã«ããã¾ã¾ç³è«ããã¨ãçç±ãèããã¦ç³è«ãéãã¾ããã ã§ãã®ã§ã¢ããªç³è«ã®ã¨ãã ãUIFileSharingEnabledãNOã«ããå¿ è¦ãããã®ã§ããããããå¿ãã¦ãã¾ã£ã¦å ¬éãé ãã¦ãã¾ããã¨ãå¤ã æãã¾ãã ããã§ä»åãDEBUGæã®ã¿UIFileSharingEnabledãYESã«ããæ¹æ³ãããã£ãã®ã§ã¡ã¢ãã¦ããã¾ãã 以ä¸ã®ãµã¤ããåèã«ããã¦ãããã¾ããã ios - UIFileSharingEnabled on debug variant only - Stack Overflow How to Add a Run Script Build phase ä½æ¥ã¯ã¨ã¦ãç°¡åã§ãRun Scriptã«ã³ã¼ããæ¸ãã
iOS App âââ Documents âââ Library â  âââ Caches â  âââ Preferences âââ tmp ã¾ããä¿åãããã¡ã¤ã«ã«ãã£ã¦ã©ãã«ä¿åãããããã¬ã¤ãã©ã¤ã³ã«å¾ã£ã¦ãããªããã°ãªãªã¼ã¹ç³è«ã§ãªã¸ã§ã¯ãããã¦ãã¾ã iOS Data Storage Guidelines - Apple Developer 以ä¸ãªã³ã¯å¼ç¨ ãã¡ã¤ã«ã·ã¹ãã ããã°ã©ãã³ã°ã¬ã¤ã (TP40010672 0.0.0) Documents ã¦ã¼ã¶ãä½æãããã¼ã¿ãä¿åããããã«ä½¿ãã¾ãããã¡ã¤ã«å ±æã®æ©è½ã«ãããã¦ã¼ã¶ã¯ãã®ãã£ã¬ã¯ããªä»¥ä¸ã«ã¢ã¯ã»ã¹ã§ãã¾ãããããã£ã¦ãã¦ã¼ã¶ã«è¦ãã¦ãæ§ããªããã¡ã¤ã«ã®ã¿ããã¦ãã ããã ãã®ãã£ã¬ã¯ããªã¯iTunesã«ãã£ã¦ããã¯ã¢ããããã¾ãã Library ããã¯ãã¦ã¼ã¶ã®ãã¼ã¿ãã¡ã¤ã«ä»¥å¤ã®ãã¡ã¤ã«ç¨ã®æä¸ä½ã
â»Application_Homeã¯Application Rootã®ã㨠â»tmpã¯ã·ã¹ãã ããã®ã¢ã¯ã»ã¹ã§æ¶å»ããããããã§ãã, ã¿ã¤ãã³ã°ãããããªãã®ã§, ãã¡ã¤ã«ã使ç¨ããªããªã£ãã èªåã§åé¤ãã¾ãããã ã§ã¯ãã¡ã¤ã«ã¯ã©ãã«ããï¼ é常ã®ã¦ã¼ã¶ãã¼ã¿, ããå©ç¨ãããã¼ã¿ãªã©ã¯, Documentsã§, ãã¼ã¿ã®ãã£ãã·ã¥ã¯, /Library/Cacheã§, ä¸æçã«å¿ è¦ãªãã¼ã¿ã¯, tmpã«ããã¾ãã iCloudé¢é£ã¯å¥ã§â¦ Simulatorã§ç¢ºèªãã Simulatorã«ããããã¼ã¿ã¯, ~/Library/Application Support/iPhone Simulator//Applications/ ã«åå¨ãã¾ããFinderã§ã確èªã§ãã¾ããLibraryãªãã¦ãªããã¨ããæ¹ã¯, ã§è¡¨ç¤ºæ¹æ³ãæ¸ãã¦ããã¾ããã ã¨ããã¢ããªã±ã¼ã·ã§ã³ã®ãã£ã¬ã¯ããªãè¦
åé ã»ã¦ã¼ã¶ã¯é«å質ã§å®å®ããã¢ããªãæ±ãã¦ããã ã»åç¾ãé£ãããã°ã¯ä¿®æ£ãé£ããã ã»ãã°ã¯åç¾ã§ããªããã°ãä¿®æ£ããã®ã«å½¹ç«ã¤ã ä¾ã¨ãã¦ãç¨ã«ããçºçããªãèªã¿è¾¼ã¿ã¨ã©ã¼ãªã©ã æ°ãããã®ã³ã°APIXcode 12 ã§ã¯çµ±ä¸ãããæ°ãããã®ã³ã° API ã追å ããããOSã«ãã£ã¦ã¢ã¼ã«ã¤ãããå¾ã§ç«¯æ«ããåå¾ã§ãããããã©ã¼ãã³ã¹ãè¯ãã ãµãã·ã¹ãã ã¨ã«ãã´ãªãæå®ãã¦Â Logger ãçæãããã®ã¤ã³ã¹ã¿ã³ã¹ã®ã¡ã½ãããå¼ã³åºãã¦å©ç¨ããã æååè£é㯠print é¢æ°ã¨ä¼¼ã¦ããããã³ã³ãã¤ã«æã«ã¯ãã°ã«æé©åãããåã«å¤æãããå®éã«ã¡ã½ãããå¼ã³åºãããã¿ã¤ãã³ã°ã§æååã«å¤æãããããã®ããå®è¡ã³ã¹ããä½ãã æ¨æºã§å¤ãã®åã«å¯¾å¿ãã¦ãããç¬èªã®åããµãã¼ãããã«ã¯ãCustomStringConvertible ã«æºæ ããã ãã§ããã éæ°å¤åã®ãã¼ã¿ã¯ããã©ã«ãã§ã¯
ãã®è¨äºã¯ ãã¯ã³ã´ Advent Calendar 2019 ã® 5 æ¥ç®ã®è¨äºã§ããããé å»ãã¾ãã å»å¹´ã®ä»é ã¯ãµã¼ããµã¤ãã¨ã³ã¸ãã¢ã¨ã㦠GraphQL ãµã¼ãããã³ã¯ã©ã¤ã¢ã³ãã®è¨è¨ã»éçºç ã«æºãã£ã¦ãã¾ããããä»å¹´ã®6æãã iOS ã¨ã³ã¸ãã¢ã¨ãã¦åãã¯ããã¾ãããéå¤ãªæè¡ç³»ã®ã¡ã¢ã¯æ®æ®µã¯ scrapbox ã«è¼ãã¦ãã¾ãã ä»ç§ããã¼ã ã®ã¡ã³ãã¼æ°å㨠iOSDC Japan 2019 ã«åå ããSwiftã«ãããã¤ã³ãã¼ãã¨ãªã³ã¯ã®ä»çµã¿ãæ¢ã ãæè´ãããã¨ã§ä»ã¾ã§ãµããããã¦ããã©ã¤ãã©ãªãã¤ã³ãã¼ãå¨ãã¸ã®ç¥èãæ·±ããæ©éãçã¾ãããããä»åã¯å¨è¾ºç¥èãæ¹ãã¦æ´çãã¤ã¤ãæçµçã«ã¯å¾ãç¥èã§æã£ã¦ãXcode ãå©ç¨ããã«æä½æ¥ã§ã©ã¤ãã©ãªã®ä½æã¨ãã«ã, å®è¡ã¾ã§ã試ãã¦ã¿ããï¼ã¨ããè¨äºãæ¸ãã¦ããã¾ãã ã¢ã¸ã¥ã¼ã«ãã¤ã³ãã¼ããã©ã¤ãã©ãªã«ã¤ãã¦ç解ãã¤
ãã®è¨äºã¯ æ ¶æ義塾大å¦SFCæäº&å¾³ç°ç Advent Calendar 2015 ã®15æ¥ç®ã®è¨äºã§ãã Swiftã¯ã½ã¼ã¹ã³ã¼ãå ¬éã¨å ±ã«Linuxã¸æ£å¼å¯¾å¿ãã¾ããã ããããMac OS Xã§Swiftãæ¸ãã¨ãã®å®çªIDEã§ããXcodeã¯æä¾ããã¦ãã¾ããã ã¨ããããããããXcodeã¯iOSãwatchOSããã¢ããªã±ã¼ã·ã§ã³ã®éçºã«ã¯ä¾¿å©ããããã¾ããããå°ããªCUIã¢ããªã±ã¼ã·ã§ã³ã®éçºã®ããã«ãããããã®éããIDEãèµ·åããã®ã¯æ°ãå¼ãã¾ãã ã¨ããããã§ãããã§ã¯Xcodeã使ç¨ããªãSwiftããã°ã©ãã³ã°ã®ããã®å種ã³ãã³ãã®ä½¿ãæ¹ã«ã¤ãã¦ãREPLããããã¬ããã©ã¤ãã©ãªã®çæããã®ä»ã®Tipsã¾ã§ãã¾ã¨ãã¾ãã iOSã¢ããªãªã©ã®éçºã«é¢ãã話ã¯ä¸ååºã¦ãã¾ããã飽ãã¾ã§ããC++ãJavaã®ãããªæ±ç¨è¨èªã®ä¸å¡ã¨ãã¦Swiftãå©ç¨ããæ¹æ³ã ãã解説ã
iOS13ããããã©ã«ãã®Modalé·ç§»ãã·ã¼ãåã«å¤æ´ã«ãªãã¾ããã ã¹ã¯ã¤ãã§VCãDismissã§ãããé·ç§»å ã®ç»é¢ãè¦ãããã¨ããæãã«ã¯ãªãã¾ãããã Dismissæã«é·ç§»å ã®ã©ã¤ããµã¤ã¯ã«ã¡ã½ãããå¼ã°ãã¾ããã printããçµæ
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}