0
votes

here is the situation: an enterprise provision profile doesn't seem to work on a particular app. Actually, it seems to work because it starts but immediately quit after the launch screen. I have verify the app does work if I use ad-hoc provision profile. I also have verify the same enterprise provision profile works for different apps as well.

I don't even know what info I should put here to get help from you :-( I am wondering maybe I need to include certain entitlement files for enterprise provision that is not needed for ad-hoc?

=== Tks for Matt's suggestion. The following is the error:

Dyld Error Message: Library not loaded: @rpath/libswiftCore.dylib
Referenced from: /private/var/mobile/Containers/Bundle/Application/90EF4C24-3BDB-4C14-9FE3-5B29EBF53B6B/MapView.app/MapView Reason: no suitable image found. Did find: /private/var/mobile/Containers/Bundle/Application/90EF4C24-3BDB-4C14-9FE3-5B29EBF53B6B/MapView.app/Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x100118000, size=0x0018C000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/90EF4C24-3BDB-4C14-9FE3-5B29EBF53B6B/MapView.app/Frameworks/libswiftCore.dylib Dyld Version: 353.6

Binary Images: 0x120014000 - 0x12003bfff dyld arm64 <36eff49275c23d2d815e48af33eea471> /usr/lib/dyld 0x18662c000 - 0x186988fff CoreFoundation arm64 <83a9627362333366a8543e8c2d28166e> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation 0x18698c000 - 0x186aeefff CoreGraphics arm64 <783a6b9356ed3b41beba516b483affb1> /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics 0x186e98000 - 0x186ef5fff CoreLocation arm64 /System/Library/Frameworks/CoreLocation.framework/CoreLocation 0x187530000 - 0x187784fff Foundation arm64 /System/Library/Frameworks/Foundation.framework/Foundation 0x1887a4000 - 0x1888b8fff MapKit arm64 <6d62056699ed3d94ba264fa1f388d82d> /System/Library/Frameworks/MapKit.framework/MapKit 0x18a84c000 - 0x18a9d0fff QuartzCore arm64 <313aba56d17e30d1b68b2fdfda1820f8> /System/Library/Frameworks/QuartzCore.framework/QuartzCore 0x18aa34000 - 0x18ac61fff SceneKit arm64 <39072d4c227e355ba92c4d3d4197d5e3> /System/Library/Frameworks/SceneKit.framework/SceneKit 0x18ad44000 - 0x18ae5ffff SpriteKit arm64 <05829ef1150035bd9175db7876ede297> /System/Library/Frameworks/SpriteKit.framework/SpriteKit 0x18aef4000 - 0x18b868fff UIKit arm64 <31ac3f3fa5153620907fbfbfd1d671b0> /System/Library/Frameworks/UIKit.framework/UIKit 0x19638c000 - 0x19638dfff libSystem.B.dylib arm64 /usr/lib/libSystem.B.dylib 0x196e9c000 - 0x197098fff libobjc.A.dylib arm64 /usr/lib/libobjc.A.dylib

Another try-and-error attempt: building a HelloWorld-objc app with the same enterprise provision profile, and it works! In conjunction with prev HelloWorld-swift app that doesn't work, plus the device error log above, I strongly suspect that has something to do with the swift+enterprise combination. I am wondering if this is my own IDE problem, or an Apple bug? If you have done the swift+enterprise combo, would you please share your experience?

2
just built a HelloWorld swift app. The enterprise distr doesn't work, either? I am getting to wonder if this is Swift specific?Sean
When you say it does not work, do you mean running straight from Xcode to the device or are you actually distributing the app via a web page and it does not work?Kris Gellci
Connect the iOS device to your Mac. Open Xcode, open the Window menu, choose Devices. Select the connected device, in the bottom you should be able to see the console of the device. Launch the app and observe the console. iOS usually logs a message if it closes an app because of a provisioning or entitlements problem.Matthias Bauch
I distribute the app via TestFlight. Matthias's pointer is great. Still don't know how to fix but at least I can read the error now. Let me modify the question by appending the errorSean

2 Answers

0
votes

If you are building an app that does not use Swift but embeds content such as a framework that does, Xcode will not include these libraries in your app. As a result, your app will crash upon launching. To workaround this issue, set the Embedded Content Contains Swift Code (EMBEDDED_CONTENT_CONTAINS_SWIFT) build setting to YES in your app. For more please visit this link.

https://developer.apple.com/library/mac/qa/qa1881/_index.html

0
votes

This is an existing bug: 18040504

The solution is renew both the provision profile and signing certificate.