Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Bug #98

Closed
ufolux opened this issue May 22, 2015 · 16 comments
Closed

Release Bug #98

ufolux opened this issue May 22, 2015 · 16 comments

Comments

@ufolux
Copy link

ufolux commented May 22, 2015

When I release my app with an In House distribution profile, It can't work on any devices. App crashed when app start. Just show a launch image then crash.

crash report is as followed:

Hardware Model: iPhone7,2
Process: xxxxx [2088]
Path: /private/var/mobile/Containers/Bundle/Application/59F06D37-9C84-4006-9A23-0A3CC76525CC/xxxxx.app/xxxxx
Identifier: com.xxx.xxxxx
Version: 1 (1.0)
Code Type: ARM-64 (Native)
Parent Process: debugserver [2085]

Date/Time: 2015-05-22 12:42:32.243 +0800
Launch Time: 2015-05-22 12:42:30.765 +0800
OS Version: iOS 8.1.2 (12B440)
Report Version: 105

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

Dyld Error Message:
Library not loaded: @rpath/libswiftCore.dylib
Referenced from: /private/var/mobile/Containers/Bundle/Application/70364C51-F086-4A5D-BCC6-FA1BEB6798BE/xxxxx.app/xxxxx
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/70364C51-F086-4A5D-BCC6-FA1BEB6798BE/OrientFund.app/Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x100A04000, size=0x0015C000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/70364C51-F086-4A5D-BCC6-FA1BEB6798BE/OrientFund.app/Frameworks/libswiftCore.dylib
Dyld Version: 353.6

Binary Images:
0x120038000 - 0x12005ffff dyld arm64 <36eff49275c23d2d815e48af33eea471> /usr/lib/dyld
0x183050000 - 0x183050fff Accelerate arm64 /System/Library/Frameworks/Accelerate.framework/Accelerate
0x18378c000 - 0x18380efff AddressBook arm64 <09e2e24ef5e23fb8a62ae209466a64bd> /System/Library/Frameworks/AddressBook.framework/AddressBook
0x184514000 - 0x184870fff CoreFoundation arm64 <83a9627362333366a8543e8c2d28166e> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x184874000 - 0x1849d6fff CoreGraphics arm64 <783a6b9356ed3b41beba516b483affb1> /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
0x18501c000 - 0x18511efff CoreText arm64 <128434ae7dda35bf8830f1914999fe3a> /System/Library/Frameworks/CoreText.framework/CoreText
0x185418000 - 0x18566cfff Foundation arm64 /System/Library/Frameworks/Foundation.framework/Foundation
0x1857f4000 - 0x185a8efff ImageIO arm64 <100a3b5e1ea13c89a9771cad8f9508b2> /System/Library/Frameworks/ImageIO.framework/ImageIO
0x18668c000 - 0x1867a0fff MapKit arm64 <6d62056699ed3d94ba264fa1f388d82d> /System/Library/Frameworks/MapKit.framework/MapKit
0x186f2c000 - 0x186fd8fff MobileCoreServices arm64 <19505cbb66af328785e293c3b2810b00> /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices
0x188734000 - 0x1888b8fff QuartzCore arm64 <313aba56d17e30d1b68b2fdfda1820f8> /System/Library/Frameworks/QuartzCore.framework/QuartzCore
0x188b4c000 - 0x188b9efff Security arm64 <823c0a3088543396bef1e351da74c835> /System/Library/Frameworks/Security.framework/Security
0x188d48000 - 0x188d60fff StoreKit arm64 /System/Library/Frameworks/StoreKit.framework/StoreKit
0x188d64000 - 0x188dd7fff SystemConfiguration arm64 /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration
0x188ddc000 - 0x189750fff UIKit arm64 <31ac3f3fa5153620907fbfbfd1d671b0> /System/Library/Frameworks/UIKit.framework/UIKit
0x194278000 - 0x194279fff libSystem.B.dylib arm64 /usr/lib/libSystem.B.dylib
0x194508000 - 0x19455efff libc++.1.dylib arm64 /usr/lib/libc++.1.dylib
0x194d88000 - 0x194f84fff libobjc.A.dylib arm64 /usr/lib/libobjc.A.dylib
0x1950bc000 - 0x19518dfff libsqlite3.dylib arm64 <286839512b673f7c938aa79ac70bde15> /usr/lib/libsqlite3.dylib
0x195344000 - 0x195355fff libz.1.dylib arm64 <2a347410b967358289e8256c913714de> /usr/lib/libz.1.dylib

It seems like swift lib can't be loaded.I search this issue on StackOverflow And I have set ma app support embedded content contains swift code. But no effect.

@danielgindi
Copy link
Collaborator

You haven't embedded the library correctly in the project. Follow again the instructions in the README carefully.
Also there's an option that sounds like "code contains Swift code", I don't recall accurately, in the target settings. Check it. In some mixed projects when you have actual Swift code and not just embedding a Framework, you have to select that.

One way or another, it's not a "release bug" and not a problem with ios-charts.

@danielgindi
Copy link
Collaborator

I guess developers are not yet experienced with Swift projects or mixed projects, so it will take some time until people will stop asking about Swift and start asking about the library itself...

@ufolux
Copy link
Author

ufolux commented May 22, 2015

Thank you for your answer, but the app work well on any devices in debug mode,the chart can be stroke correctly. It just crash when I release it with a in-house profile. I just drag all swift files into my project for supporting iOS7 just like the README says.

@danielgindi
Copy link
Collaborator

When create a Swift file in your project Xcode asks you if you want to turn
the project into a Mixed project. And there's also that project setting I
mentioned. And there's stackoverflow.com.

‏בתאריך יום שישי, 22 במאי 2015, ufolux notifications@github.com כתב:

Thank you for your answer, but the app work well on any devices in debug
mode,the chart can be stroke correctly. It just crash when I release it
with a in-house profile. I just drag all swift files into my project for
supporting iOS7 just like the README says.


Reply to this email directly or view it on GitHub
#98 (comment)
.

@ufolux
Copy link
Author

ufolux commented May 22, 2015

I use the chart demo to test release problem. It also crashed when start up on iOS8.But debug is also ok.And I really have dragged all swift files into my project to support iOS7, and do the swift objc mix settings. problem is still here.T_T,should I embedded the framework when I need to support iOS7? Frankly speaking, neither embedded nor not can solve this issue. Sorry to ask these questions, maybe these disturbed you a lot...

@AlBirdie
Copy link
Contributor

Your issue is somehow related do your project settings. Can you please confirm that the project is working with iOS8 only (set the deployment target to 8.0)?

@ufolux
Copy link
Author

ufolux commented May 22, 2015

No,It can work well on iOS 7 and iOS 8 in debug mode, but not well in release mode(In-House certification). And Thank you for your reply.

@AlBirdie
Copy link
Contributor

Interesting, I'm now having the exact same issue after creating a framework (https://kodmunki.wordpress.com/2015/03/04/cocoa-touch-frameworks-for-ios8-remix/). My project won't work in debug mode, though.
Using an enterprise certificate as well, but that doesn't have anything to do with this error. The issue is related to XCode not properly packaging the library for the required architecture.
Gosh, sometimes I really hate these nasty XCode bugs...

@ufolux
Copy link
Author

ufolux commented May 22, 2015

The issue cost me 2 days to solve. But all in vain...T_T

@AlBirdie
Copy link
Contributor

So how did you solve it then?

@AlBirdie
Copy link
Contributor

Found the solution to your problem. https://www.airsignapp.com/ios-apps-using-swift-crash-when-signed-with-inhouse-certificate/

For my issue, that won't work, unfortunately, as the error is related to framework packaging.

@ufolux
Copy link
Author

ufolux commented May 22, 2015

No, can't solve, it seems like relative to the certification. I saw some people said on StackOverflow that I need to revoke old certification and create a new one to archive the app. But our in-house certifications are both in use. So change a framework is my only choice. Apple is so troublesome..

@ufolux
Copy link
Author

ufolux commented May 22, 2015

Yes, I also saw the article, but I can't do like that. So no solution for me.

@AlBirdie
Copy link
Contributor

I'm afraid there is no way to "change a framework" when the certificate itself is the culprit to this issue. The only solution would be to just create a new certificate for this app.

@ufolux
Copy link
Author

ufolux commented May 22, 2015

It only affect to Swift project, Objc project has no problem.

@ufolux
Copy link
Author

ufolux commented May 22, 2015

My certification really has no OU field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants