設定遠端連線

參考老師這篇:從Windows連線到Mac之問題除錯

ssh [email protected]
ip:192.168.1.9
帳號:系統組MAC

確認本機的IphoneX為已連線,不是「連線能力受限」,如連線能力受限,請試著重開VS。

修改info.plist

<key>MinimumOSVersion</key>
<string>6.0</string>

改為

<string>9.0</string>

模擬器選擇iOS 7以上

先去確認content有沒有被建立起來

在iOS debug

Main.cs下中斷點,看在開始時有沒有被init

UIApplication.Main(args, null, "AppDelegate");

AppDelegate.cs


global::Xamarin.Forms.Forms.Init();

App.xaml.cs




protected override void OnInitialized()
        {
            InitializeComponent();
            FlowListView.Init();   
     NavigationService.NavigateAsync("SplashPage");//下中斷點
        }

在SplashPage.xaml.cs的codebehide下中斷點,看content有沒有 被觸發



 public SplashPage()
        {
            InitializeComponent();
            CrossConnectivity.Current.ConnectivityTypeChanged += Current_ConnectivityTypeChanged;
            //下中斷點,或是回到最原始的狀態,再一個個加入
        }

這邊過了之後,到SplashPageViewModel.cs中看建構式時是否有成功,發現是GooglePlay注入沒有寫,造成出錯


public SplashPageViewModel(INavigationService navigationService) //, IIsGooglePlayAvailable IsGooglePlayAvailable
{
    _navigationService = navigationService;
}

iOS閃退

  • Xamarin專案中有使用Clear方法的請注意,若有切換Picker時,按導航的上一頁ios若發生閃退情形。

iOS info.plist設定

iOS中Info.plist文件的常见配置

Launch Screens &icon

iOS Launch Screens Creating A Splash Screen In Xamarin Forms https://goo.gl/mej5XQ 在iOS上很難作到修改,原因是要轉換語言,還有要設定 Launch Image,要作到符合每個尺寸的話,起碼會多20MB 見此論壇

不同iOS版本裝實體error問題解決

error MT1006: Could not install the ...

Armv7 + Arm64 fat build is incompatible with iPhone 4s

list of iOS devices

官方文件 32/64-bit platform considerations

以及以下回復

Hi All,

I see that the post is very old, But still I am writing this as this may be useful for someone coming up later.

I was facing the same issue, and I just changed the build settings
Double Click on ".iOS" -> Build -> iOS Build -> Code generation & runtime

Change the value of "Supported architecture" to match the target device that you are trying to deploy onto.

h**ps://developer.xamarin.com/guides/cross-platform/macios/32-and-64/

Thanks
Karthaa Labs

上文出自於此

VS畫面

VS上測試新實體之設定操作

  • 在Mac上的Xcode

  • apple developer

Xamarin Publishing to the App Store

https://docs.microsoft.com/en-us/xamarin/ios/deploy-test/app-distribution/app-store-distribution/publishing-to-the-app-store?tabs=vswin

Xamarin打包ipa的方法

1.將Debug改為Ad-Hoc,選iPhone,不可以用iPhoneSimulator

2.若有成功連接系統組的MacAir,ios專案的「屬性」 iOS組建:支授的架構:ARMv7+ARM64 iOS套件部署: 簽署識別應可選 iPhone Distribution: Yuan Ze University(6WD6YR2BD2) 佈建設定檔應可選 Yzu's XamarinApp 建置:輸出的地方按「進階」按紐,於偵錯資訊,選「僅限Pdb」

3.Entitlements.plist 點右鍵用「iOS資訊清單編輯器」打開後,啟用推播通知打勾 點右鍵用「Html編輯器」打開後,aps-environmentdevelopment,把development改為production

4.info.plist 點右鍵用「iOS資訊清單編輯器」打開後 點「視覺資產」,確認App圖示來源是「應用程式圖示」後,存檔後iOS專案的「資產目錄」會變成可以點開

5.點開「資產目錄」按Media兩下,點應用程式圖示,設定icon圖示:120@3x 120@2x 4040 7676 152@2x 167@2x 1024*1024,存檔關掉

6.info.plist 點右鍵用「Html編輯器」打開後 刪除

XSLaunchImageAssets

Resources/Media.xcassets/Launch 影像.launchimage 存檔關掉

7.點右鍵用「iOS資訊清單編輯器」打開info.plist 「應用程式」中的「組建」必須比iTunes Connect上的版本大,「部署目標」設為8.0,存檔後即可打包建置 ios專案按右鍵建置後,一會兒後於系統組的MacAir會要求輸入鑰匙圈登入的密碼,打完密碼後按確定 xamarin專案出現建置成功後,打包好的ipa檔即位於XamarinPrismYzu.iOS/bin/Ad-Hoc

如何上傳ipa到iTunes Connect的方法

1.先將打包好的ipa檔利用雲端硬碟傳到系統組的MacAir 2.在系統組的MacAir打開Xcode 點Xcode/Open Developer Tool/Application loader後,選擇已下載的ipa檔 3.跳出視窗確認所選的ipa檔沒錯後,按「下一步」讓它繼續檢查 4.出現錯誤訊息的話,回到專案修改排除錯誤再重新打包ipa.... 5.檢查到完全沒錯了,恭禧傳送成功了,等候email吧 6.如果apple開發者帳號email收到錯誤has one or more issues,只好繼續排除錯誤再重新打包ipa.... 7.如果apple開發者帳號email收到completed processing,恭禧>apple終於接受你的app,可以在iTunes Connect的所有建置版本中找到了

出現缺少「應用程式圖示」

1.在iOS專案上,點選資產目錄下的Media,然後在左側選擇「應用程式圖示」,把右邊最下列顯示有的圖示,按照大小和X的比例去iOS專案的Resource一個一個對應找 2.找完後至info.plist上面,刪除以下屬性

<key>XSLaunchImageAssets</key>
    <string>Resources/Media.xcassets/Launch 影像.launchimage</string>

重新建制就可以了~

results matching ""

    No results matching ""