2019年11月14日 星期四

Windows:關於 Teamviewer重新安裝的方法

關於 Teamviewer重新安裝的方法

註:  MacOS 的方法還再找....

 - 單位時間內, 連線太多台遠端 Teamviewer就會被定義為商業使用
 - 連續連線到某一台被定義為商業使用的, 也會被定義為商業使用
   (這也會感染, 真的醉了...)

 使用 Teamview AlterID 最快速,最簡單

 但下面這個解決方案最完整
 重點在那個 SID Change Utility
  Windows 7 SID 更換後, 重新開機就可以
  但Windows 10 SID更換後, 所有的 User Account Register Data都會被刪除
  一堆軟體的設定,都要重新設定,麻煩.

 SIDCHG 使用方法
 D:>  sidchg64.exe /f /r /key:3YPCr-vF9fi-R2VB7-ef

 那個 3YPCr-vF9fi-R2VB7-ef 就是免費的測試Key
 SIDCHG Key 的 Trial key在網頁的中間段, 捲頁就找的到
    SIDCHG SID Change Utility Trial key


解決方案:
 TeamViewer ‘Commercial Use Suspected’ fix

2019年11月5日 星期二

swift 5: 關於iOS13禁用beginIgnoringInteractionEvents後的取代方法

 UIApplication.shared.beginIgnoringInteractionEvents()
 因為 beginIgnoringInteractionEvents 在 iOS 13已被作廢


 解決方案來源:
  這網址內容是日文, 看網頁下方的程式就可以
  如何鎖定屏幕以防止在iOS 13上操作

swift 5: 關於 iPad OS 13.2 Can't end BackgroundTask錯誤訊息


APP 在執行時, 按了一下 Home/Touch ID Sensor 就會發生

Can't end BackgroundTask: no background task exists with identifier 3 (0x3), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.

在網路查詢了一堆資料
得到結論: 別理會這個錯誤

註:
 這在錯誤訊息 在 Xcode 12.4 就突然消失了...
 反而跑出另一段錯誤訊息 

 [Snapshotting] 
Snapshotting a view (0x102810000, UIKeyboardImpl) that has not been
 rendered at least once requires afterScreenUpdates:YES.

2019年10月30日 星期三

swift 5: 關於 iPad 10.2" iPad OS 13.2 Xcode Debug

關於 iPad 10.2" iPad OS 13.2 Xcode Debug
 這台iPad (7th)10.2"台灣於11月初才開始銷售
 如果直接更新到 13.2 會造成 Xcode 11.1以前的版本偵測錯誤

UIScreen.main.bounds
 單位: point
 Width 1024
 High 768

 iPad (7th)
 UIScreen.main.bounds
  單位: point
  Width 1080
  High 810

 UIScreen.main.nativeBounds
  單位: pixel
  Width 1620
  High 2160

 方案一. 別更新到 iPad OS 13.2

 方案二. 請下載 Xcode 11.2
   如果你把 macOS 升級到  Catalina 10.15.1
   有可能每次開啟 Xcode時發生 "正在驗證Xcode 11.2"
   那就把Xcode 11.2移除, 重新安裝Xcode 11.2
 
   先安裝Xcode 11.2再升級到 Catalina 10.15.1, 整個macOS 變的超級慢,
   請看這邊  macOS: 關於macOS 10.15 Catalina 安裝


 方案三. 降級回到 iOS 13.1.2
   但iPad每天會提醒要更新到 13.2 超級煩的

    [降級教學] 如何替新版 iOS 13 降回舊版 iOS 13.1.3 攻略技巧

   如果您有 Apple Developer Account 可以直接到 Apple 官方網站各種韌體iPSW下載
      iOS 各系列 Restore Images
      iPad OS 各系列 Restore Images
 
   也可以到這邊點選下載
   iOS 13 / iPadOS 13 各版本認證伺服器狀態 
   iPadOS 13正式版各種韌體iPSW下載清單含認證狀態
   iPadOS 13.1.3 正式版(17A878) iPSW官方下載點 (2019.10.16)

  使用 iTunes回復iPad, 要先關閉 iPad的 Find My功能
  iPad -> Setting -> Password & Account -> Find My-> Find My iPad -> Off

  How to Use IPSW File to Restore iPhone iPad with iTunes(Dass Loss)
   Hold Alt key (on Mac) or Shift key (on Windows) and click on the “Restore” button from your iTunes.




2019年10月25日 星期五

swift 5: 關於移除 Xcode simulator images file

關於移除 Xcode simulator images file
 這些檔案都滿大的, 如果不須要, 可以手動移出
  目錄所在: /Library/Developer/CoreSimulator/Profiles/Runtimes

 解決方案來源:
  Can I delete unnecessary device simulators of Xcode?


 Xcode 11開發工具新的功能解說
    註: 可以打開右下角的三個點, 可以顯示字幕(有簡體中文)
 Apple WWDC 2019 What's New in Xcode 11

Xcode 11開發工具模擬器功能解說
  Apple WWDC 2019 Getting the Most Out of Simulator


 

2019年10月24日 星期四

swift 5: 關於iOS 13.x 深色模式及Label文字顏色差異

深色模式會對APP 產生一響
 請看這一篇
  Apple WWDC 2019 SwiftUI Essentials video
    註: 可以打開右下角的三個點, 可以顯示字幕(有簡體中文)
  天生支援 dark mode 的 SwiftUI Color

 也就是說
  原本 light 模式中, Label Font Color Deuault是黑色
  APP畫面就會呈現為白底黑字

 但轉換為 dark模式
  Label Font Color Deuault是白色
  如依原本設計, 就會變成白底白字畫面, 白色字體就看不到了
  因此就要轉換畫面底色為黑色
  但原來的 Button 圖片是黑色外框, 這時就發生鋸齒,
  Button 圖片也要一起更換重畫.

解決方案來源:
 How to check if Dark Appearance is enabled tvOS
 Apple Developer UI Element Colors
 Apple Developer UIColor


 請在 info.plist增加一個Key
 <key>UIUserInterfaceStyle</key>
   <string>Automatic</string>


判斷是否為 iOS13
    if #available(iOS 13.0, *)
    {
     // Fallback on 13.0 versions
      checkInterfaceStyle()
    } 
    else 
    {
     // Fallback on earlier versions
    }

取得 brightness mode

 func checkInterfaceStyle()
 {
   guard(traitCollection.responds(to: #selector(getter: UITraitCollection.userInterfaceStyle)))
      else { return }

   let style = traitCollection.userInterfaceStyle

    switch style
    {
     case .light:
       print("light")
     case .dark:
       print("dark")
     case .unspecified:
       print("unspecified")
     @unknown default:
       print("unknown default")
       fatalError()
    }
 }


這是一個 Label Text 在新舊版本之間的程式差異

Main Storyboard中畫面的設定如下
 Main View 的 Background 設定為 System Background Color
  System Background Color light Mode 其實是白色
  System Background Color dark Mode 其實是黑色
 Label Color 設定為 Defalut( Label Color)
  Defalut Label Color light Mode 其實是黑色
  Defalut Label Color dark Mode 其實是白色


   if #available(iOS 13.0, *)
   {
    if( MyLabel.textColor != UIColor.label)
    {// 黑底白字, 只適用於 iOS 13.0以上版本
     MyLabel.textColor = UIColor.label
    }
   }
   else
   {  // Fallback on earlier versions
    if( MyLabel.textColor != UIColor.darkText)
    { // 白底黑字
     MyLabel.textColor = UIColor.darkText
    }
   }



2019年10月23日 星期三

swift 5: 關於iOS偵測網路連線方法

 在 iOS 12以上, 已新增 Network framework - NWPathMonitor 偵測網路連線
 如果是 iOS 12之前可以使用 Reachability.swift

 解決方案來源:

 Class NWPathMonitor
 
 利用 NWPathMonitor 偵測網路連線
 
 Detecting Internet Access on iOS 12+
 
 Reachability.swift
 
 橋接第三方 Objc Library - Reachability and Bridge.h