Allow resources .process to specify which type of files to be included

Currently, the target resources, .process() allow both directory and the full path to the resource files.
But if we make the resource directory contains .swift or other source code file, this will produce warning.

To make the warning gone, we have to explicitly specify all the .xib files like below

.target(
    name: "Social",
    resources: [
        .process("Wrapper/Feed/Custom Post/Cells/ThumbsUpCell.xib"),
        .process("Wrapper/Feed/Custom Post/Cells/BirthdayPostCell.xib"),
        .process("Wrapper/Feed/Custom Post/Cells/NewEmployeeCell.xib"),
        .process("Scene/InviteFriends/InviteFriendsViewController.xib"),
        .process("Scene/Loading/View/LoadingViewController.xib"),
        .process("Scene/Profile/View/ProfileEditViewController.xib"),
        .process("Scene/Profile/View/ProfileViewController.xib"),
        .process("Scene/ProfileSettings/ProfileSettingsViewController.xib"),
        .process("Scene/ProfileSettings/Cells/ProfileSettingTableViewCell.xib"),
        .process("Scene/People/Cells/SearchContactsTableViewCell.xib"),
        .process("Scene/People/Cells/SelectedUserCollectionViewCell.xib"),
        .process("Scene/People/Cells/FriendRequestTableViewCell.xib"),
        .process("Scene/People/Cells/ChatTableViewCell.xib"),
        .process("Scene/People/Cells/FriendTableViewCell.xib"),
        .process("Scene/People/Cells/SendRequestTableViewCell.xib"),
        .process("Scene/People/Views/FriendsPickerViewController.xib"),
        .process("Scene/People/Views/SearchContactsViewController.xib"),
        .process("Scene/People/Views/PeopleViewController.xib"),
        .process("Scene/People/Views/EmptyViews/SearchEmptyView.xib"),
        .process("Scene/CustomView/TitleHeaderView.xib"),
        .process("Images.xcassets"),
    ]),

Normally, those xib files will always locate along side their source code.

I think the .process will have a set of extensions that it will work with can this be expose as a parameter to .process something like .process("path/to/directory", type: [.xib, .storyboard]), the above package will be just

.target(
    name: "Social",
    resources: [
        .process("", types: [.xib, .xcassets])
    ]),
1 Like
Terms of Service

Privacy Policy

Cookie Policy