-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
App created by Archive cannot run on devices. #240
Comments
does your Export by Adhoc mean in-house distribution or the 'Save for Ad Hoc Deployment'? If so, you need to check your production cert, checkout:http://stackoverflow.com/questions/30867698/app-with-objective-c-and-swift-code-crash-at-launch-in-release-mode-debug-mode/30881865#30881865 In short: your cert is generated before swift born, so it lacks one attribute, and you need to generate a new cert and let your provisioning file use the new cert. github issue is here:#154 |
@liuxuan30 Yes, you right! I use the in-house distrubution. Look like your explaination is make sense, I'll try that solution on monday and feedback soon. Thank you! |
It could also be related to not adding as an Embedded Framework, see README |
@danielgindi Can it be archived successfully without adding as embedded framework? I wonder if not adding as embedded framework, it won't build at all. |
If you are building as a Framework, and have not dragged the code to the project, then it must be added as an Embedded framework. Otherwise the compiler does not actually embed the framework's code in the project - assuming it is available in the OS like any other framework - and will crash on runtime when it cannot load the library. |
It is interesting that compiler does not complain framework is not found while compiling... |
It is compiling of course because it is found... But it does not embed it...
|
I see. Thanks. Wait for @hxdev to reveal the answer! |
Sorry for lately feedback, I'm working on a project with provisioning file was provided by customer, I've check the OU property and see that it's missng, I'll try @liuxuan30 solution. @danielgindi My project write in ObjC and support iOS 7+, so that mean I must drag the Charts folder to my project only or drag folder and the drag the Charts.xcodeproj too? I've create a new target with name "Adhoc-Debug" and Archive with this target, do I need to add an target "Adhoc-Debug" for Charts project too? Because sometimes I got the "Charts/Charts.h file not found" when Archive or run UnitTest. |
You need to go to the "Build Phases" of your "Adhoc-Debug" target and add the Charts library there like you add any framework |
Sorry for my mistake, I mean the Build Config not Target, it's duplicate of Debug build config. |
Whenever you want to run something that uses a framework which is not built in in the OS, you need to link to it (Embedded Frameworks, Link Binary With Library, etc.) |
Finally, it's working perfect with new provisioning file which support Swift. Thanks so much for your support @liuxuan30 |
No problem! |
@liuxuan30 thank you. This thread helped me to solve my problem. 👍 |
@abraxascorner no problem, glad to hear it works and helping more and more people. |
I face with a strange problem, I can Run or Build my project which added the ios-charts but when I try to Archive, it's Archive successful, after Export by Adhoc and install on devices, the app with force close when open. Any one face same problem?
The text was updated successfully, but these errors were encountered: