blog.kulman.sk/change-uiapplication-class

Preview meta tags from the blog.kulman.sk website.

Linked Hostnames

6

Search Engine Appearance

Google

https://blog.kulman.sk/change-uiapplication-class

Changing UIApplication base class

When developing an iOS application you might get into a situation when you need to change the UIApplication base class. It is often a requirement when using various MDM SDKs, like the Mobile Iron AppConnect SDK. There are two ways to do that in a Swift application, both with some advantages and disadvantages. Declarative method with Info.plist The first method to change the UIApplication base class is using Info.plist. It is quite simple, you just need to add a new key NSPrincipalClass with a string value representing the name of the desired class, like AppConnectUIApplication when using the Mobile Iron AppConnect SDK. <key>NSPrincipalClass</key> <string>AppConnectUIApplication</string> No actual code changes are required. Code method with main.swift The second method is a bit more complicated but more flexible at the same time. First you need to remove @UIApplicationMain from your AppDelegate class definition. Then you add a main.swift to the root of your project that looks like this import AppConnect import UIKit UIApplicationMain( CommandLine.argc, CommandLine.unsafeArgv, ACUIApplicationClassName, NSStringFromClass(AppDelegate.self) ) The third parameter in the UIApplicationMain call is the name of the desired class, ACUIApplicationClassName in this example.



Bing

Changing UIApplication base class

https://blog.kulman.sk/change-uiapplication-class

When developing an iOS application you might get into a situation when you need to change the UIApplication base class. It is often a requirement when using various MDM SDKs, like the Mobile Iron AppConnect SDK. There are two ways to do that in a Swift application, both with some advantages and disadvantages. Declarative method with Info.plist The first method to change the UIApplication base class is using Info.plist. It is quite simple, you just need to add a new key NSPrincipalClass with a string value representing the name of the desired class, like AppConnectUIApplication when using the Mobile Iron AppConnect SDK. <key>NSPrincipalClass</key> <string>AppConnectUIApplication</string> No actual code changes are required. Code method with main.swift The second method is a bit more complicated but more flexible at the same time. First you need to remove @UIApplicationMain from your AppDelegate class definition. Then you add a main.swift to the root of your project that looks like this import AppConnect import UIKit UIApplicationMain( CommandLine.argc, CommandLine.unsafeArgv, ACUIApplicationClassName, NSStringFromClass(AppDelegate.self) ) The third parameter in the UIApplicationMain call is the name of the desired class, ACUIApplicationClassName in this example.



DuckDuckGo

https://blog.kulman.sk/change-uiapplication-class

Changing UIApplication base class

When developing an iOS application you might get into a situation when you need to change the UIApplication base class. It is often a requirement when using various MDM SDKs, like the Mobile Iron AppConnect SDK. There are two ways to do that in a Swift application, both with some advantages and disadvantages. Declarative method with Info.plist The first method to change the UIApplication base class is using Info.plist. It is quite simple, you just need to add a new key NSPrincipalClass with a string value representing the name of the desired class, like AppConnectUIApplication when using the Mobile Iron AppConnect SDK. <key>NSPrincipalClass</key> <string>AppConnectUIApplication</string> No actual code changes are required. Code method with main.swift The second method is a bit more complicated but more flexible at the same time. First you need to remove @UIApplicationMain from your AppDelegate class definition. Then you add a main.swift to the root of your project that looks like this import AppConnect import UIKit UIApplicationMain( CommandLine.argc, CommandLine.unsafeArgv, ACUIApplicationClassName, NSStringFromClass(AppDelegate.self) ) The third parameter in the UIApplicationMain call is the name of the desired class, ACUIApplicationClassName in this example.

  • General Meta Tags

    11
    • title
      Changing UIApplication base class - Igor Kulman
    • charset
      utf-8
    • X-UA-Compatible
      IE=edge
    • viewport
      width=device-width, initial-scale=1, shrink-to-fit=no
    • theme-color
  • Open Graph Meta Tags

    4
    • og:title
      Changing UIApplication base class
    • og:description
      When developing an iOS application you might get into a situation when you need to change the UIApplication base class. It is often a requirement when using various MDM SDKs, like the Mobile Iron AppConnect SDK. There are two ways to do that in a Swift application, both with some advantages and disadvantages.
    • og:type
      article
    • og:url
      https://blog.kulman.sk/change-uiapplication-class/
  • Twitter Meta Tags

    3
    • twitter:card
      summary
    • twitter:title
      Changing UIApplication base class
    • twitter:description
      When developing an iOS application you might get into a situation when you need to change the UIApplication base class. It is often a requirement when using various MDM SDKs, like the Mobile Iron AppConnect SDK. There are two ways to do that in a Swift application, both with some advantages and disadvantages.
  • Item Prop Meta Tags

    6
    • name
      Changing UIApplication base class
    • description
      When developing an iOS application you might get into a situation when you need to change the UIApplication base class. It is often a requirement when using various MDM SDKs, like the Mobile Iron AppConnect SDK. There are two ways to do that in a Swift application, both with some advantages and disadvantages.
    • datePublished
      2019-10-30T05:29:12+01:00
    • dateModified
      2019-10-30T05:29:12+01:00
    • wordCount
      261
  • Link Tags

    10
    • apple-touch-icon
      https://blog.kulman.sk/apple-touch-icon.png
    • canonical
      https://blog.kulman.sk/change-uiapplication-class/
    • icon
      https://blog.kulman.sk/favicon.ico
    • preload
      https://blog.kulman.sk/theme.png
    • preload
      https://blog.kulman.sk/images/avatar.jpg

Links

21