Giter Club home page Giter Club logo

shark's People

Contributors

freewaying avatar kaandedeoglu avatar mickeyl avatar phimage avatar quaertym avatar quangdecember avatar yotamoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

shark's Issues

Please support Framework target

in line 28 of XcodeProjectHelper.swift ; I know you might want to eliminates Tests & Aggregate target but this eliminates SDK targets also

let applicationTargets = xcodeproj.pbxproj.nativeTargets.filter({ $0.productType == .application })

the generated code doesn't contain Bundle information, so it will fail for framework bundle

Skip Preview Assets

SwiftUI apps usually contain a folder with assets that are only used for the SwiftUI Preview mechanism in Xcode. Shark should ignore that folder, since the assets contained in there are not shipped, hence not accessible, in the final binary.

NSDataAsset

Today I learned about NSDataAsset, which would come in handy for, e.g. sounds, level maps, or what not. NSDataAssets are also stored in the asset catalogue, so it might be cool to support them in shark.

Make enums CaseIterable

I'm not sure if this is actually possible, but can we make the generated enums conform to CaseIterable? The use case here is that I have a list of images in my preview assets for testing purposes, and I need to put them in a long list. Without CaseIterable, I need to manually make the array of images.

Not working with LaunchImage on xcassets

Hey,

It does not works when the project has a LaunchImage. It creates the following code for LaunchImage:

public enum LaunchImage.launchimage {
}

which causes a build time crash.

No top-level namespace

I realize I can adjust the top-level namespace with the --name argument and bring the namespaces into the top level area via typealiases, but would it be possible to get rid of the top-level namespace altogether?

Shark.swift file contains invalid swift code when a particular font file is present

I have a font file with name "Lato-Light.ttf". (https://fonts.google.com/specimen/Lato)

The code generated for this font is

public enum F {
    public static func lato-light(ofSize size: CGFloat) -> UIFont { return UIFont(name: "Lato-Light", size: size)! }
}

The font name contains hyphen and is invalid swift code.

P.S.- I have several other font files with hyphen in their file names. However, Shark generates correct snakeCase font names for those files. The issue is seen only for this particular font file

Build error

PhaseScriptExecution Run\ Script\ -\ Shark /Users/gsimmons/Library/Developer/Xcode/DerivedData/CareConsult-etlsolxnmuijbhfkgvpwykbilvup/Build/Intermediates/CareConsult.build/Debug-iphonesimulator/CareConsult.build/Script-6DB712881BA9A9DD0031CBE7.sh
cd /Users/gsimmons/Developer/CenseoHealth/CareConsult
/bin/sh -c /Users/gsimmons/Library/Developer/Xcode/DerivedData/CareConsult-etlsolxnmuijbhfkgvpwykbilvup/Build/Intermediates/CareConsult.build/Debug-iphonesimulator/CareConsult.build/Script-6DB712881BA9A9DD0031CBE7.sh

/Users/gsimmons/Library/Developer/Xcode/DerivedData/CareConsult-etlsolxnmuijbhfkgvpwykbilvup/Build/Intermediates/CareConsult.build/Debug-iphonesimulator/CareConsult.build/Script-6DB712881BA9A9DD0031CBE7.sh: line 2: Creating: command not found
Command /bin/sh failed with exit code 127

Build issue with XCode 7.3

Hi,
I've been successfully using your script with XCode 7.2 and Swift 2.0

Now, after migration to new XCode 7.3, my builds with Shark run scripts are failing.

screen shot 2016-03-29 at 11 47 44

Build is failling with exit code 133:

screen shot 2016-03-29 at 11 48 31

SwiftUI

It would be great, if Shark was able to work with SwiftUI, in particular for multi-platform projects. For this to happen, we probably need to remove all references to UIKit and work with the SwiftUI-provided abstractions, such as Color and Image.

Storyboard support

Would it be possible to add support for enumifying Storyboards, e.g. accessing Main.storyboard as R.S.Main?

(I'd have a go at a pull request, if you don't have the time for it – although I would need some guidance… 😄)

Build issue on XCode 8.3.3

It might be worth noting that this is an iOS app, given that it seems to be looking in the macOS toolchain.

dyld: lazy symbol binding failed: Symbol not found: __TFesRxs10Collectionwx8IteratorzGVs16IndexingIteratorx_wx8_ElementzWxS0_7Element_rS_12makeIteratorfT_GS1_x_
  Referenced from: /Users/ericmarkmartin/Developments/Trigger/iOSApp/Trigger/Pods/Shark/shark
  Expected in: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib

dyld: Symbol not found: __TFesRxs10Collectionwx8IteratorzGVs16IndexingIteratorx_wx8_ElementzWxS0_7Element_rS_12makeIteratorfT_GS1_x_
  Referenced from: /Users/ericmarkmartin/Developments/Trigger/iOSApp/Trigger/Pods/Shark/shark
  Expected in: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libswiftCore.dylib

/Users/ericmarkmartin/Library/Developer/Xcode/DerivedData/Trigger-cxxjofophvubgoaphyfavfngywyx/Build/Intermediates/Trigger.build/Debug-iphonesimulator/Trigger.build/Script-8813BC861F06A74300EA08A3.sh: line 2: 55552 Abort trap: 6           "$PODS_ROOT/Shark/shark" "${PROJECT_DIR}/${PROJECT_NAME}/Images.xcassets" "${PROJECT_DIR}/${PROJECT_NAME}"
Command /bin/sh failed with exit code 134

Enforcement `CaseIterable` needs to be optional

By making all the enums CaseIterable you essentially breaking all the projects which have their resources separated in different folders, cause now all the resources of the same type are under one huge enum, instead of the nested ones. Have to fork the tool to fix it now.

Run only, if necessary

Great project. Lean and mean, no hidden magic, it just works!

That said, is there an easy way to run it only after the .xcodeproj file has been updated?

Swift Build Plugin

With all the work on Swift Build Plugins ­– which found its way into Xcode 14 ­– we should create a Swift Build Plugin that relieves users from having to edit the Xcode build phases to run Shark.

This would increase usability with CI/CD as well, such as that we wouldn't have to add the generated file(s) into the SCM.

Automatic preview updating paused

Unless you run the Shark script with "For install builds only", the automatic preview of SwiftUI in Xcode keeps popping up "Automatic preview updating paused". I'm guessing this is because it detects changes to the relevant source code.

Build fails due to error related to localization

I am running shark using the following command

if [ -x "$(command -v shark)" ]; then
    shark "$PROJECT_FILE_PATH" "$PROJECT_DIR/$PROJECT_NAME"
else
    echo "error: shark not installed, run command brew install kaandedeoglu/formulae/shark"
fi

It fails with following error

Fatal error: Error raised at top level: Shark.LocalizationBuilderError.invalidLocalizableStringsFile(path: "/Users/username/app-name/app-name/app-name/Base.lproj/LaunchScreen.storyboard/en.lproj/LaunchScreen.strings"): file /BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-1001.8.63.13/swift/stdlib/public/core/ErrorType.swift, line 200

Localization is enabled for the LaunchScreen.storyboard.

The LaunchScreen.storyboard is found at file path /Users/username/app-name/app-name/app-name/Base.lproj/LaunchScreen.storyboard.

The LaunchScreen.strings file for English is found at file path /Users/username/app-name/app-name/app-name/en.lproj/LaunchScreen.strings and not at the file path mentioned in the error (/Users/username/app-name/app-name/app-name/Base.lproj/LaunchScreen.storyboard/en.lproj/LaunchScreen.strings)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.