Mustafa
Mustafa

Reputation: 20564

Application crashing on launch

My application that works flawlessly in Debug/Development mode, crashes on launch in Distribution (Enterprise Distribution Build). Here's the crash log:

Incident Identifier: D03AA940-6D86-41E7-A90C-997C7C840570 CrashReporter Key: f79cf5348f25235e81156465863880c9a213ba09 Hardware Model: iPhone7,2 Process: EFC [1405] Path:
/private/var/containers/Bundle/Application/9C9BAABD-1BD5-4684-894E-329C6A11CE9C/MyApp.app/MyApp Identifier: com.company.ent-myapp Version: 100 (0.1) Code Type: ARM-64 (Native) Parent Process:
launchd 1

Date/Time: 2016-05-07 12:14:07.07 +0500 Launch Time:
2016-05-07 12:14:07.07 +0500 OS Version: iOS 9.3.1 (13E238) Report Version: 105

Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000001, 0x000000012003d088 Triggered by Thread: 0

Filtered syslog: None found

Dyld Error Message: Dyld Message: Library not loaded: @rpath/Alamofire.framework/Alamofire Referenced from: /var/containers/Bundle/Application/9C9BAABD-1BD5-4684-894E-329C6A11CE9C/MyApp.app/MyApp Reason: no suitable image found. Did find: /private/var/containers/Bundle/Application/9C9BAABD-1BD5-4684-894E-329C6A11CE9C/MyApp.app/Frameworks/Alamofire.framework/Alamofire: mmap() errno=1 validating first page of '/private/var/containers/Bundle/Application/9C9BAABD-1BD5-4684-894E-329C6A11CE9C/MyApp.app/Frameworks/Alamofire.framework/Alamofire' /private/var/containers/Bundle/Application/9C9BAABD-1BD5-4684-894E-329C6A11CE9C/MyApp.app/Frameworks/Alamofire.framework/Alamofire: mmap() errno=1 validating first page of '/private/var/containers/Bundle/Application/9C9BAABD-1BD5-4684-894E-329C6A11CE9C/MyApp.app/Frameworks/Alamofire.framework/Alamofire' /private/var/containers/Bundle/Application/9C9BAABD-1BD5-4684-894E-329C6A11CE9C/MyApp.app/Frameworks/Alamofire.framework/Alamofire: mmap() errno=1 validating first page of '/private/var/containers/Bundle/Applicatio Dyld Version: 390.7

Binary Images: 0x100008000 - 0x10081ffff EFC arm64 <202501eaffad3aa4a30e701306b22a26> /var/containers/Bundle/Application/9C9BAABD-1BD5-4684-894E-329C6A11CE9C/MyApp.app/MyApp 0x12003c000 - 0x12006bfff dyld arm64 /usr/lib/dyld

  1. I've tried preparing the Enterprise Distribution build with Enable Bitcode Yes and No.
  2. I've verified multiple times that the code signing and provisioning profiles are setup properly.
  3. I have the latest/ renewed Apple Worldwide Developer Relations Certification Authority.
  4. I'm using cocoapods in my project, and I'm working with Release configurations, that are using Pods-MyApp.release. Note: I'm using cocoapods in my project for the first time. Incase it's relevant, content of my pods file are below for reference.

Contents of my Podfile:

platform :ios, '8.0'

use_frameworks!

target 'EFC' do

pod 'Alamofire', '~> 3.0'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
pod 'PayPal-iOS-SDK'

pod 'AlamofireNetworkActivityIndicator', '~> 1.0'
pod 'AlamofireImage', '~> 2.0'
pod 'ObjectMapper', '~> 1.2'

pod 'GoogleMaps'
pod 'UILoadControl'

end

I'm stumped. Any clue as to what's going on? How can I fix this and successfully prepare my enterprise build?

Maybe I'm missing something in cocoapods setup (for release/distribution), but I don't know what!?

Edit

The export dialog looks like this, if that makes any difference.

enter image description here

Upvotes: 3

Views: 1195

Answers (2)

Mustafa
Mustafa

Reputation: 20564

I re-generated the Distribution CERTIFICATE, and profile. THIS resolved the issue for me!

Upvotes: 1

dasdom
dasdom

Reputation: 14073

Wild guess: I assume that you use a build configuration that is not called Release in the Enterprise build. Try to add a build config to the pod frameworks with the same name as the build config you are using for your Enterprise build.

Upvotes: 0

Related Questions