2

I have converted the existing app to Swift 3, but when I try to launch it from Xcode nothing happens.

To be exact the app is successfully installed, opened, but shows only white screen. No buildtime or runtime errors.

I put breakpoint in private func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool, but it doesn't arrive there.

Launching in simulator prints the following in console:

2016-09-19 14:52:47.881377 ProjectName[63797:9522206] bundleid: com.company.ProjectName, enable_level: 0, persist_level: 0, propagate_with_activity: 0

2016-09-19 14:52:47.897791 ProjectName[63797:9522206] subsystem: com.apple.siri, category: Intents, enable_level: 1, persist_level: 1, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0, enable_private_data: 0

2016-09-19 14:52:47.933007 ProjectName[63797:9525057] subsystem: com.apple.UIKit, category: HIDEventFiltered, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0

2016-09-19 14:52:47.936713 ProjectName[63797:9525057] subsystem: com.apple.UIKit, category: HIDEventIncoming, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0

2016-09-19 14:52:48.006885 ProjectName[63797:9525049] subsystem: com.apple.BaseBoard, category: MachPort, enable_level: 1, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0, enable_private_data: 0

2016-09-19 14:52:48.039142 ProjectName[63797:9522206] subsystem: com.apple.UIKit, category: StatusBar, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0

2016-09-19 14:52:48.142475 ProjectName[63797:9522206] subsystem: com.apple.BackBoardServices.fence, category: App, enable_level: 1, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0, enable_private_data: 0

Device: iPhone SE iOS 9.3.5

Simulator: 6 and SE, both iOS 10.0

Help? Anyone? Please.

Elena
  • 829
  • 8
  • 20

2 Answers2

3

Product -> Scheme -> Edit Scheme Then on Run Section on the left, select Argument Tab -> Environment Variable:

OS_ACTIVITY_MODE to value : disable.

Removed the framework it from Cocoapods, installed it manually by copying the SDK in the project.

Amit Srivastava
  • 1,105
  • 9
  • 18
  • 1
    I removed totally the framework from the project, and set `OS_ACTIVITY_MODE` to disable. No result =( – Elena Sep 19 '16 at 13:14
1

Try to replace

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

to this:

func applicationDidFinishLaunching(_ application: UIApplication) {
pedrouan
  • 12,762
  • 3
  • 58
  • 74
  • 1
    OMG, you saved me! That was the problem: the wrong signature of the main app method. Actually I used this one now: `func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?)` 'cause I'll need launch options later. – Elena Sep 19 '16 at 14:30
  • 1
    Oh yeah, this function is updated either- not returning anything. You're welcome. – pedrouan Sep 19 '16 at 15:22