Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

Fix Swift project handling #22

Merged
merged 1 commit into from
Nov 15, 2014
Merged

Fix Swift project handling #22

merged 1 commit into from
Nov 15, 2014

Conversation

lvillani
Copy link
Contributor

Swift project may bundle additional ".framework" bundles, make sure to not search them while looking for the application's Info.plist file.

@lvillani lvillani changed the title Fix wift project handling Fix Swift project handling Nov 15, 2014
@KrauseFx
Copy link
Collaborator

Thanks for the pull request. I don't have any Swift projects yet.

Could you change the line to

   if ['.plist', '.bundle', '.framework'].any? { |a| file.name.include?a }

and test if it works? It's more Ruby like 👍

@lvillani
Copy link
Contributor Author

@KrauseFx It doesn't seem to work.

@KrauseFx
Copy link
Collaborator

Are you sure?
I just tried this locally:

irb(main):002:0> ['.plist','.bundle', '.framework'].any?{|a| "name.bundle".include?a}
=> true
irb(main):003:0> ['.plist','.bundle', '.framework'].any?{|a| "name.somethingelse".include?a}
=> false

@lvillani
Copy link
Contributor Author

I had to change the guard to something like:

if file.name.include?'.plist' and not ['.bundle', '.framework'].any? { |a| file.name.include?a }

(I need to exclude Info.plist files coming from within frameworks)

@KrauseFx
Copy link
Collaborator

Oh, I'm sorry, that was my mistake. Nice catch! Looks good

@KrauseFx
Copy link
Collaborator

Could you add that? I'll merge the PR then.

@lvillani
Copy link
Contributor Author

Done and tested locally 😉

KrauseFx added a commit that referenced this pull request Nov 15, 2014
@KrauseFx KrauseFx merged commit 46a8a1a into fastlane-old:master Nov 15, 2014
@KrauseFx
Copy link
Collaborator

Thanks @lvillani! 👍

@KrauseFx
Copy link
Collaborator

Just released a new version for this fix: https://github.com/KrauseFx/deliver/releases

@KrauseFx
Copy link
Collaborator

Hey @lvillani
Just curios: Did you submit a swift app using deliver? I read about issues on the Apple dev forum: https://devforums.apple.com/thread/245492
Did it work?

@lvillani
Copy link
Contributor Author

@KrauseFx Yes but I had to build the IPA with Xcode and then export an IPA from the Organizer. Alternatively, there are a couple of scripts around which inject the "SwiftSupport" directory in the IPA file. I'm going to file a bug report to push for a fix in xcodebuild (either that or remove the PackageApplication step altogether, since in the current form it doesn't really work. They say it is "not supported" but leaving an half-implemented feature lying around is as detrimental as not having it at all).

@KrauseFx
Copy link
Collaborator

Good to know. So, you can prepare and test a fix for Swift projects? Unfortunately I don't have any apps, which are built with Swift to test it...

@lvillani
Copy link
Contributor Author

lvillani commented Dec 1, 2014

Are we talking about adding a test case for this issue or for another one?

@KrauseFx
Copy link
Collaborator

KrauseFx commented Dec 1, 2014

Sorry, I was not talking about unit tests. I meant more like: Could you (manually) test the submission of a Swift app with one of those scripts you were talking about?
I think I'll just create a demo swift app and will work on this issue.

@KrauseFx
Copy link
Collaborator

KrauseFx commented Dec 1, 2014

@lvillani Could you send me some links to the tools which helped you?

@lvillani
Copy link
Contributor Author

lvillani commented Dec 1, 2014

I built my app with Xcode's GUI, then exported the IPA and did the final upload with deliver. The script I was talking about is here but I have yet to try it.

@KrauseFx
Copy link
Collaborator

KrauseFx commented Jan 7, 2015

@lvillani it looks like @sinoru found a solution for the Swift problem: nomad-cli/shenzhen#178

@lvillani
Copy link
Contributor Author

lvillani commented Jan 7, 2015

Cool! I might give it a try the next time I push an update.

@KrauseFx
Copy link
Collaborator

KrauseFx commented Jan 7, 2015

@lvillani Thanks, please let me know, once you know more. I don't have any swift production apps right now.
You can report back on this issue: #42

@fastlane-old fastlane-old locked and limited conversation to collaborators Mar 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants