diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 63aeb1dd..e9809e46 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -2,21 +2,21 @@ name: Checks on: push: - branches: [ master ] + branches: [ main ] pull_request: branches: '*' env: - DEVELOPER_DIR: /Applications/Xcode_13.0.app/Contents/Developer + DEVELOPER_DIR: /Applications/Xcode-16.0.0.app/Contents/Developer jobs: unit-tests: - runs-on: macos-11 + runs-on: self-hosted steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Pull cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: .build key: ${{ runner.os }}spm${{ hashFiles('**/Package.resolved') }} @@ -25,71 +25,103 @@ jobs: - name: Test run: swift test -v - test-iOS: - runs-on: macos-11 - needs: build + test-iOS-ResourceApp: + runs-on: self-hosted + needs: build-rswift steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Download build - uses: actions/download-artifact@v1 + uses: actions/download-artifact@v4.1.7 with: name: rswift-dev + path: rswift-dev - name: Put build into place run: | - mkdir -p build/Debug - mv rswift-dev/rswift build/Debug/rswift - chmod +x build/Debug/rswift + mkdir -p .build/release + mv rswift-dev/rswift .build/release/rswift + chmod +x .build/release/rswift - name: Pull cache - uses: actions/cache@v2 + uses: actions/cache@v4 id: podcache-ios with: - path: Examples/Pods + path: Examples/ResourceApp/Pods key: ${{ runner.os }}pods${{ hashFiles('**/Podfile.lock') }} restore-keys: | ${{ runner.os }}pods - name: Install pods if: steps.podcache-ios.outputs.cache-hit != 'true' - run: pod install --project-directory=Examples + run: pod install --project-directory=Examples/ResourceApp - name: Test - run: fastlane scan --workspace "Examples/RswiftExamples.xcworkspace" --scheme "ResourceApp" + #run: fastlane scan --workspace "Examples/ResourceApp/ResourceApp.xcworkspace" --scheme "ResourceApp" + run: xcodebuild -workspace Examples/ResourceApp/ResourceApp.xcworkspace -scheme ResourceApp -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.0' test - test-tvOS: - runs-on: macos-11 - needs: build + test-iOS-StaticFrameworks: + runs-on: self-hosted + needs: build-rswift steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Download build - uses: actions/download-artifact@v1 + uses: actions/download-artifact@v4.1.7 with: name: rswift-dev + path: rswift-dev - name: Put build into place run: | - mkdir -p build/Debug - mv rswift-dev/rswift build/Debug/rswift - chmod +x build/Debug/rswift - - name: Pull cache - uses: actions/cache@v2 - id: podcache-tvos + mkdir -p .build/release + mv rswift-dev/rswift .build/release/rswift + chmod +x .build/release/rswift + - name: Test + #run: fastlane scan --project "Examples/RswiftAppWithStaticFrameworks/RswiftAppWithStaticFrameworks.xcodeproj" --scheme "App" + run: xcodebuild -project Examples/RswiftAppWithStaticFrameworks/RswiftAppWithStaticFrameworks.xcodeproj -scheme App -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.0' test + + test-iOS-LocalizedStringApp: + runs-on: self-hosted + needs: build-rswift + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Download build + uses: actions/download-artifact@v4.1.7 with: - path: Examples/Pods - key: ${{ runner.os }}pods${{ hashFiles('**/Podfile.lock') }} - restore-keys: | - ${{ runner.os }}pods - - name: Install pods - if: steps.podcache-tvos.outputs.cache-hit != 'true' - run: pod install --project-directory=Examples + name: rswift-dev + path: rswift-dev + - name: Put build into place + run: | + mkdir -p .build/release + mv rswift-dev/rswift .build/release/rswift + chmod +x .build/release/rswift + - name: Test + run: xcodebuild -project Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj -scheme LocalizedStringApp -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.0' test + + test-tvOS: + runs-on: self-hosted + needs: build-rswift + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Download build + uses: actions/download-artifact@v4.1.7 + with: + name: rswift-dev + path: rswift-dev + - name: Put build into place + run: | + mkdir -p .build/release + mv rswift-dev/rswift .build/release/rswift + chmod +x .build/release/rswift - name: Test - run: fastlane scan --workspace "Examples/RswiftExamples.xcworkspace" --scheme "ResourceApp-tvOS" + #run: fastlane scan --project "Examples/RtvApp/RtvApp.xcodeproj" --scheme "ResourceApp-tvOS" + run: xcodebuild -project Examples/RtvApp/RtvApp.xcodeproj -scheme ResourceApp-tvOS -destination 'platform=tvOS Simulator,name=Apple TV,OS=18.0' test - build: - runs-on: macos-11 + build-rswift: + runs-on: self-hosted steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Pull cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: .build key: ${{ runner.os }}spm${{ hashFiles('**/Package.resolved') }} @@ -97,11 +129,11 @@ jobs: ${{ runner.os }}spm - name: Set version run: | - sed -i "" "s/\(static let version = \"\)Unknown\(\"\)/\1Development build: ${GITHUB_SHA}\2/" Sources/rswift/Rswift.swift + sed -i "" "s/\(static let version = \"\)Unknown\(\"\)/\1Development build: ${GITHUB_SHA}\2/" Sources/rswift/Config.swift - name: Build run: swift build -v -c release - name: Store artifact - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: rswift-dev path: .build/release/rswift diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 881d8fc8..6ee8d1bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,17 +5,17 @@ on: types: created env: - DEVELOPER_DIR: /Applications/Xcode_12.5.app/Contents/Developer + DEVELOPER_DIR: /Applications/Xcode-16.0.0.app/Contents/Developer jobs: release-build: - runs-on: macos-11 + runs-on: self-hosted steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set version run: | - sed -i "" "s/\(static let version = \"\).*\(\"\)/\1${TAG}\2/" Sources/rswift/Rswift.swift + sed -i "" "s/\(static let version = \"\).*\(\"\)/\1${TAG}\2/" Sources/rswift/Config.swift env: TAG: ${{ github.event.release.tag_name }} - name: Tarball source @@ -33,34 +33,41 @@ jobs: asset_name: rswift-${{ github.event.release.tag_name }}-source.tar.gz asset_content_type: application/tar+gzip - - name: Build fat binary + - name: Build universal binary run: | swift build -c release --arch x86_64 --arch arm64 + - name: Delete temp keychain from previous run + run: | + /usr/bin/security delete-keychain signing_temp.keychain || true - name: Import Signing Certificates - uses: apple-actions/import-codesign-certs@v1 + uses: apple-actions/import-codesign-certs@v3 with: - p12-file-base64: ${{ secrets.APPLE_CERTS }} - p12-password: ${{ secrets.APPLE_CERTS_PASSWORD }} + p12-file-base64: ${{ secrets.APPLE_CERTIFICATES }} + p12-password: ${{ secrets.APPLE_CERTIFICATES_PASSWORD }} - name: Code Sign run: | - codesign --force --options runtime --sign 'Developer ID Application: Mathijs Kadijk (5Z49PA849J)' .build/apple/Products/Release/rswift + codesign --force --options runtime --sign "$IDENTITY" .build/apple/Products/Release/rswift + env: + IDENTITY: 'Developer ID Application: Nonstrict B.V. (WT5N9FK54M)' - name: Store build artifact - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: rswift-${{ github.event.release.tag_name }} path: .build/apple/Products/Release/rswift - name: Archive ZIP - run: zip --junk-paths ${{ runner.temp }}/rswift-${{ github.event.release.tag_name }}.zip .build/apple/Products/Release/rswift License + run: zip --junk-paths $FILENAME .build/apple/Products/Release/rswift License && zip --recurse-paths $FILENAME Sources/RswiftResources + env: + FILENAME: ${{ runner.temp }}/rswift-${{ github.event.release.tag_name }}.zip - name: Notarize ZIP run: | - sh notarize.sh + xcrun notarytool submit $FILENAME --apple-id $APPLE_ID --password $APP_PASSWORD --team-id $TEAM_ID --wait env: - BUNDLE_ID: nl.mathijskadijk.rswift - DEV_ACCOUNT: ${{ secrets.APPLE_ID_EMAIL }} - PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} - DEV_TEAM: 5Z49PA849J + BUNDLE_ID: com.nonstrict.rswift + APPLE_ID: ${{ secrets.APPLE_IDENTIFIER }} + APP_PASSWORD: ${{ secrets.APPLE_IDENTIFIER_PASSWORD }} + TEAM_ID: WT5N9FK54M FILENAME: ${{ runner.temp }}/rswift-${{ github.event.release.tag_name }}.zip - name: Attach ZIP to release uses: actions/upload-release-asset@v1 @@ -71,34 +78,80 @@ jobs: asset_path: ${{ runner.temp }}/rswift-${{ github.event.release.tag_name }}.zip asset_name: rswift-${{ github.event.release.tag_name }}.zip asset_content_type: application/zip + + - name: Make artifact bundle + run: | + set -ex + + mkdir -p $ARTIFACT_BUNDLE_DIR/rswift/bin + cp .build/apple/Products/Release/rswift $ARTIFACT_BUNDLE_DIR/rswift/bin + cp License $ARTIFACT_BUNDLE_DIR/rswift + + cat < $ARTIFACT_BUNDLE_DIR/info.json + { + "schemaVersion": "1.0", + "artifacts": { + "rswift": { + "type": "executable", + "version": "$VERSION", + "variants": [ + { + "path": "rswift/bin/rswift", + "supportedTriples": ["x86_64-apple-macosx", "arm64-apple-macosx"] + }, + ] + } + } + } + EOF - - name: Publish to Cocoapods + pushd $ARTIFACT_BUNDLE_DIR + zip -r $FILENAME . + popd + env: + VERSION: ${{ github.event.release.tag_name }} + ARTIFACT_BUNDLE_DIR: ${{ runner.temp }}/rswift.artifactbundle + FILENAME: ${{ runner.temp }}/rswift-${{ github.event.release.tag_name }}.artifactbundle.zip + - name: Notarize artifact bundle run: | - export POD_VERSION=$(echo $TAG_NAME | cut -c2-) - pod trunk push + xcrun notarytool submit $FILENAME --apple-id $APPLE_ID --password $APP_PASSWORD --team-id $TEAM_ID --wait env: - TAG_NAME: ${{ github.event.release.tag_name }} - COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} + BUNDLE_ID: com.nonstrict.rswift + APPLE_ID: ${{ secrets.APPLE_IDENTIFIER }} + APP_PASSWORD: ${{ secrets.APPLE_IDENTIFIER_PASSWORD }} + TEAM_ID: WT5N9FK54M + FILENAME: ${{ runner.temp }}/rswift-${{ github.event.release.tag_name }}.artifactbundle.zip + - name: Attach artifact bundle to release + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ${{ runner.temp }}/rswift-${{ github.event.release.tag_name }}.artifactbundle.zip + asset_name: rswift-${{ github.event.release.tag_name }}.artifactbundle.zip + asset_content_type: application/zip - name: Archive PKG run: | mkdir -p $PKG_ROOT/$BINARY_ROOT cp .build/apple/Products/Release/rswift $PKG_ROOT/$BINARY_ROOT - pkgbuild --root $PKG_ROOT --identifier "nl.mathijskadijk.rswift" --version $TAG_NAME --install-location "/" --sign "Developer ID Installer: Mathijs Kadijk (5Z49PA849J)" $FILENAME + pkgbuild --root $PKG_ROOT --identifier $BUNDLE_ID --version $TAG_NAME --install-location "/" --sign "$IDENTITY" $FILENAME env: TAG_NAME: ${{ github.event.release.tag_name }} FILENAME: ${{ runner.temp }}/rswift-${{ github.event.release.tag_name }}.pkg - BUNDLE_ID: nl.mathijskadijk.rswift + BUNDLE_ID: com.nonstrict.rswift + IDENTITY: 'Developer ID Installer: Nonstrict B.V. (WT5N9FK54M)' PKG_ROOT: ${{ runner.temp }}/pkgroot BINARY_ROOT: /usr/local/bin - name: Notarize PKG run: | - sh notarize.sh && xcrun stapler staple "$FILENAME" + xcrun notarytool submit $FILENAME --apple-id $APPLE_ID --password $APP_PASSWORD --team-id $TEAM_ID --wait + xcrun stapler staple $FILENAME env: - BUNDLE_ID: nl.mathijskadijk.rswift - DEV_ACCOUNT: ${{ secrets.APPLE_ID_EMAIL }} - PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} - DEV_TEAM: 5Z49PA849J + BUNDLE_ID: com.nonstrict.rswift + APPLE_ID: ${{ secrets.APPLE_IDENTIFIER }} + APP_PASSWORD: ${{ secrets.APPLE_IDENTIFIER_PASSWORD }} + TEAM_ID: WT5N9FK54M FILENAME: ${{ runner.temp }}/rswift-${{ github.event.release.tag_name }}.pkg - name: Attach PKG to release uses: actions/upload-release-asset@v1 @@ -110,5 +163,15 @@ jobs: asset_name: rswift-${{ github.event.release.tag_name }}.pkg asset_content_type: application/pkg - - name: Publish to Homebrew - run: brew bump-formula-pr --tag $TAG_NAME --revision $REVISION rswift || exit 0 + - name: Delete temp keychain from this run + if: always() + run: | + /usr/bin/security delete-keychain signing_temp.keychain || true + + - name: Publish to Cocoapods + run: | + export POD_VERSION=$TAG_NAME + pod trunk push --allow-warnings + env: + TAG_NAME: ${{ github.event.release.tag_name }} + COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} diff --git a/Documentation/Contribute.md b/Documentation/Contribute.md index 4b51f901..416a71c0 100644 --- a/Documentation/Contribute.md +++ b/Documentation/Contribute.md @@ -8,8 +8,8 @@ Thank you for taking some of your precious time helping this project move forwar Most important is to read the docs and scan the issue tracker before so you're sure your question/idea/bugreport isn't already answered/in the make/being fixed: -- [Read the Readme](https://github.com/mac-cain13/R.swift/blob/master/Readme.md) -- [Read the other documentation](https://github.com/mac-cain13/R.swift/tree/master/Documentation) +- [Read the Readme](/README.md) +- [Read the other documentation](/Documentation) - [Check open pull requests](https://github.com/mac-cain13/R.swift/pulls) - [Search the issue tracker](https://github.com/mac-cain13/R.swift/issues) diff --git a/Documentation/Examples.md b/Documentation/Examples.md index 66e001f1..cff6daa5 100644 --- a/Documentation/Examples.md +++ b/Documentation/Examples.md @@ -13,11 +13,7 @@ The `R.validate()` method will throw a detailed error about the problems that oc *Example testcase* ```swift -do { - try R.validate() -} catch { - XCTFail(error) -} +XCTAssertNoThrow(try R.validate()) ``` ## Images @@ -260,3 +256,42 @@ class RecentsController: UICollectionViewController { } } ``` + +## Project + +*Vanilla* +```swift +let developmentRegion = fatalError("Not available at runtime") +let myTag = "myTag" +``` + +*With R.swift* + +Access the development region and any asset tags that are set on the project file. + +```swift +let developmentRegion = R.project.developmentRegion +let myTag = R.project.knownAssetTags.myTag +``` + +## Entitlements + +*With R.swift* + +Access the values in the entitlement file you embedded. This might differ from the entitlements your app actually has at runtime! But it's greate to get some identifiers in a consistent way. + +```swift +let appGroupIdentifier = R.entitlements.comAppleSecurityApplicationGroups.groupMyAppGroup +``` + +## Info.plist + +Values under `UIApplicationShortcutItems`, `UIApplicationSceneManifest`, `NSUserActivityTypes`, `NSExtension` that are often needed in code are available directly through R.swift. + +*With R.swift* + +Access the values in the Info.plist file. + +```swift +let activity = NSUserActivity(activityType: R.info.nsUserActivityTypes.planTripIntent) +``` diff --git a/Documentation/Ignoring.md b/Documentation/Ignoring.md index d404f143..9d08bf4f 100644 --- a/Documentation/Ignoring.md +++ b/Documentation/Ignoring.md @@ -40,7 +40,7 @@ It is also possible to call the binary with the `--rswiftignore` flag and give a ## Only run specific generators (exclude R.something) -By default, R.swift runs all generators, for images, nibs, strings and many more. In some situations you may not want to generate R structs for all these types. You can choose to run only certain generators by adding a flag like this: `--generators image,string` to the call to the [Build Phase](https://github.com/mac-cain13/R.swift/blob/master/Documentation/Images/BuildPhaseExample.png) +By default, R.swift runs all generators, for images, nibs, strings and many more. In some situations you may not want to generate R structs for all these types. You can choose to run only certain generators by adding a flag like this: `--generators image,string` to the call to the [Build Phase](/Documentation/Images/BuildPhaseExample.png) These are the available generators: diff --git a/Documentation/Images/RswiftSPMInstallation.mp4 b/Documentation/Images/RswiftSPMInstallation.mp4 new file mode 100644 index 00000000..2df6e20b Binary files /dev/null and b/Documentation/Images/RswiftSPMInstallation.mp4 differ diff --git a/Documentation/Images/RunBuildToolPluginsBlank.png b/Documentation/Images/RunBuildToolPluginsBlank.png new file mode 100644 index 00000000..849d4f18 Binary files /dev/null and b/Documentation/Images/RunBuildToolPluginsBlank.png differ diff --git a/Documentation/Images/RunBuildToolPluginsRswift.png b/Documentation/Images/RunBuildToolPluginsRswift.png new file mode 100644 index 00000000..26b0bc99 Binary files /dev/null and b/Documentation/Images/RunBuildToolPluginsRswift.png differ diff --git a/Documentation/Images/RunXcodeModifyPackages.png b/Documentation/Images/RunXcodeModifyPackages.png new file mode 100644 index 00000000..3c45791b Binary files /dev/null and b/Documentation/Images/RunXcodeModifyPackages.png differ diff --git a/Documentation/Migration.md b/Documentation/Migration.md index a176a830..576a474a 100644 --- a/Documentation/Migration.md +++ b/Documentation/Migration.md @@ -2,6 +2,70 @@ Pointers for migration between major versions. +## Upgrading to 7.0 + +[Demo video: Updating from R.swift 6 to Rswift 7](https://www.youtube.com/watch?v=icihJ_hin3I) + +#### R.string changes + - Strings are always formatted using `String(format:)`, even strings without arguments, make sure to escape any percentage signs (`%`) with `%%` + - Use a custom language: `R.string(preferredLanguages: ["fr"]).example.hello()` + +#### Running the executable + +If you're using Swift Package Manager: + - Separate R.swift.Library is no longer needed, remove dependency on that package + - `R.generated.swift` file is no longer needed in the project, delete the file + - Remove custom Run Script Build Phase that invokes `rswift` binary + - Add SPM dependency on `github.com/mac-cain13/R.swift.git` package + - Add `RswiftLibrary` to your targets + - Under "Run Build Tool Plug-ins" Build Phase, add `RswiftGenerateInternalResources` or `RswiftGeneratePublicResources` ([Screenshot](Images/RunBuildToolPluginsRswift.png)) + - Right-click on your project, and run `RswiftXcodeModifyPackages` to modify your Xcode project so that the build tool plug-in will actually run during builds (this seems to fix a bug in Xcode?) ([Screenshot](Images/RunXcodeModifyPackages.png)) + +If you're using Mint or manual call `rswift` executable: + - Separate R.swift.Library is no longer needed, remove dependency on that package + - Add SPM dependency on `github.com/mac-cain13/R.swift.git` package + - Add `RswiftLibrary` to your targets + +Changes to the commandline tool `rswift` (not relevant when using SPM): + - Argument `accessLevel` renamed to `access-level` + - Argument `generateUITestFile` removed, if you need a separate file with just ids, call rswift a second time with `--generators id` + - Argument `hostingBundle` removed, bundle can be specified in code: `_R(bundle: someBundle)` + - Arguments removed: `bundleIdentifier`, `productModuleName`, `infoPlistFile`, `codeSignEntitlements`, `builtProductsDir`, `developerDir`, `platformDir`, `sdkRoot`, `sourceRoot`. Use environment variables instead. + +#### Library changes + +Internal changes in the Rswift support library: + - Support for `R.nib.XXX.secondView` to `.twentiethView` has been removed, only `.firstView` remains + - Renamed internal module, update `import Rswift` to `import RswiftResources` + - Removed protocols: `ColorResourceType`, `FileResourceType`, `FontResourceType`, `IdentifierType`, `ImageResourceType`, `StoryboardViewControllerResourceType`, `StringResourceType`, `Validatable` + - Added `StringResource1` up to `StringResource9`, for strings with parameters + - Renamed types: + * `ReuseIdentifierType` to `ReuseIdentifierContainer` + * `NibResourceType` to `NibReferenceContainer` + * `StoryboardResourceType` to `StoryboardReference` + * `StoryboardResourceWithInitialControllerType` to `InitialControllerContainer` + * `TypedStoryboardSegueInfo` to `TypedSegue` + * `StoryboardSegueIdentifier` to `SegueIdentifier` + +#### Configuring Continuous Integration system + +When using a Swift Package Manager Plugin on a Continuous Integration (CI) server, you may see the following error: + +> The following build commands failed: +> Validate plug-in “RswiftGeneratePublicResources” in package “r.swift” + +To allow the running of plugins, pass `-skipPackagePluginValidation` to xcbuildtool. See also this discussion on the Swift forums: https://forums.swift.org/t/telling-xcode-14-beta-4-to-trust-build-tool-plugins-programatically/59305 + +For users of Fastlane, pass the extra argument like so: +``` +build_app( + ... + xcargs: "-skipPackagePluginValidation" + ... +) +``` + + ## Upgrading to 6.0 - In the Build Phase, some changes are needed, [see an example screenshot](Images/BuildPhaseExample.png): diff --git a/Documentation/QandA.md b/Documentation/QandA.md index 5babe63d..3cee58e7 100644 --- a/Documentation/QandA.md +++ b/Documentation/QandA.md @@ -2,47 +2,40 @@ ## Why was R.swift created? -Swift is a beautiful language and one of it's main advantages is that more and more is typed. This catches a lot of errors at compile time. It feels very strange to refer to resources with strings that will always compile and then fail at runtime. It makes refactoring hard and it's to easy to create bugs like missing images etc. +Swift is a beautiful language and one of it's main advantages is its increasing popularity. However, it can be frustrating to deal with errors that compile but fail during runtime due to missing resources. This makes refactoring difficult while making it easy to create bugs (e.g. missing images etc). -In Android there is a generated R class that kind of solves this problem. That was why I decided to make something like it for us Swift developers and called the project R.swift. It was well received by colleagues, friends and Github stargazers, so here we are now. +Android tackles this problem by generating something called the R class. It inspired me to create this very project, R.swift, which, thankfully, was well received by colleagues, friends and Github stargazers, so here we are now. ## Why should I choose R.swift over alternative X or Y? -There are many nice R.swift alternatives like [SwiftGen](https://github.com/AliSoftware/SwiftGen), [Shark](https://github.com/kaandedeoglu/Shark) and [Natalie](https://github.com/krzyzanowskim/Natalie). I believe R.swift has important advantages over all of them: +There are many nice R.swift alternatives like [SwiftGen](https://github.com/AliSoftware/SwiftGen) and [Shark](https://github.com/kaandedeoglu/Shark). However, I believe R.swift has these important advantages: - R.swift inspects your Xcodeproj file for resources instead of scanning folders or asking you for files - R.swift supports a lot of different assets -- R.swift stays very close to the vanilla Apple API's, it's a minimal code change with maximum impact +- R.swift stays very close to the vanilla Apple API's, having minimal code change with maximum impact ## What are the requirements to run R.swift? R.swift works with Xcode 10 for apps targetting iOS 8 and tvOS 9 and higher. -## How to use methods with a `Void` argument? +## How do I fix missing imports in the generated file? -Xcode might autocomplete a function with a `Void` argument (`R.image.settingsIcon(Void)`), just remove the `Void` argument and you're good to go: `R.image.settingsIcon()`. +If you get errors like `Use of undeclared type 'SomeType'` in the `R.generated.swift` file, this can usually be fixed by [explicitly stating the module in your xib or storyboard](Images/ExplicitCustomModule.png). This will make R.swift recognize that an import is necessary. -The reason this happens is because of the availability of the var `R.image.settingsIcon.*` for information about the image and also having a function with named the same name. +## How do I use classes with the same name as their module? -## How to fix missing imports in the generated file? +If you get errors like `'SomeType' is not a member type of 'SomeType'`, that means you are using a module that contains a class/struct/enum with the same name as the module itself. This is a known [Swift issue](https://bugs.swift.org/browse/SR-898). -If you get errors like `Use of undeclared type 'SomeType'` in the `R.generated.swift` file most of the time this can be fixed by [explicitly stating the module in your xib or storyboard](Images/ExplicitCustomModule.png). This will make R.swift recognize that an import is necessary. - -## How to use classes with the same name as their module? - -If you get errors like `'SomeType' is not a member type of 'SomeType'` you're using a module that contains a class/struct/enum with the same name as the module itself. This is a known [Swift issue](https://bugs.swift.org/browse/SR-898). - -Work around this problem by [*emptying* the module field in the xib or storyboard](Images/ExplicitCustomModule.png). Then [add `--import SomeType` as a flag](Images/CustomImport.png) to the R.swift build phase to make sure R.swift imports the module in the generated file. +You can work around this problem by [*emptying* the module field in the xib or storyboard](Images/ExplicitCustomModule.png) and then [adding `--import SomeType` as a flag](Images/CustomImport.png) to the R.swift build phase to ensure R.swift imports the module in the generated file. ## Can I use R.swift in a library? Yes, just add R.swift as a buildstep in your library project and it will work just like normal. This works best if you have a dedicated Xcode project you can use to add the build script to. For Cocoapod users: this is [not the case](https://github.com/mac-cain13/R.swift/issues/430#issue-344112657) if you've used `pod lib create MyNewLib` to scaffold your library. -If you want to expose the resources to users of your library you have to make the generated code public, you can do this by adding `--accessLevel public` to the call to R.swift. For example, if you included R.swift as a cocoapod dependency to your library project, you would change your build step to: `"$PODS_ROOT/R.swift/rswift" generate --accessLevel public "$SRCROOT"` +If you want to expose the resources to users of your library, you have to make the generated code public, you can do this by adding `--accessLevel public` to the call to R.swift. For example, if you included R.swift as a cocoapod dependency to your library project, you would change your build step to: `"$PODS_ROOT/R.swift/rswift" generate --accessLevel public "$SRCROOT"` ## How does R.swift work? During installation you add R.swift as a Build phase to your target, basically this means that: - Every time you build R.swift will run - It takes a look at your Xcode project file and inspects all resources linked with the target currently build -- It generates a `R.generated.swift` file that contains a struct with types references to all of your resources - +- It generates a `R.generated.swift` file that contains a struct with types references to all of your resources diff --git a/Examples/FileSystemSynchronized/FileSystemSynchronized.xcodeproj/project.pbxproj b/Examples/FileSystemSynchronized/FileSystemSynchronized.xcodeproj/project.pbxproj new file mode 100644 index 00000000..09749817 --- /dev/null +++ b/Examples/FileSystemSynchronized/FileSystemSynchronized.xcodeproj/project.pbxproj @@ -0,0 +1,681 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 74; + objects = { + +/* Begin PBXBuildFile section */ + E212C64E291BE24B000E4F65 /* RswiftLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = E212C64D291BE24B000E4F65 /* RswiftLibrary */; }; + E212C650291BE252000E4F65 /* RswiftLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = E212C64F291BE252000E4F65 /* RswiftLibrary */; }; + E22057AE2C9C71D70070148F /* Colors@3x.jpg in Resources */ = {isa = PBXBuildFile; fileRef = E22057AB2C9C71D70070148F /* Colors@3x.jpg */; }; + E243EFB02510E08D00DC653F /* TheAppClipApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = E243EFAF2510E08D00DC653F /* TheAppClipApp.swift */; }; + E243EFB22510E08D00DC653F /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E243EFB12510E08D00DC653F /* ContentView.swift */; }; + E243EFB42510E08E00DC653F /* ClipAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E243EFB32510E08E00DC653F /* ClipAssets.xcassets */; }; + E243EFB72510E08E00DC653F /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E243EFB62510E08E00DC653F /* Preview Assets.xcassets */; }; + E243EFBC2510E08E00DC653F /* TheAppClip.app in Embed App Clips */ = {isa = PBXBuildFile; fileRef = E243EFAD2510E08D00DC653F /* TheAppClip.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + E2A7F4732CD799F300FCB116 /* MySiriIntents.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = E2A7F4722CD799F300FCB116 /* MySiriIntents.intentdefinition */; }; + E2A7F4742CD799F300FCB116 /* MySiriIntents.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = E2A7F4722CD799F300FCB116 /* MySiriIntents.intentdefinition */; }; + E2A7F4B62CD7A25100FCB116 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = E2A7F4B42CD7A25100FCB116 /* Localizable.strings */; }; + E2A7F4B72CD7A25100FCB116 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = E2A7F4B42CD7A25100FCB116 /* Localizable.strings */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + E243EFBA2510E08E00DC653F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E243EF892510DF9100DC653F /* Project object */; + proxyType = 1; + remoteGlobalIDString = E243EFAC2510E08D00DC653F; + remoteInfo = TheAppClip; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + E243EFBD2510E08E00DC653F /* Embed App Clips */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(CONTENTS_FOLDER_PATH)/AppClips"; + dstSubfolderSpec = 16; + files = ( + E243EFBC2510E08E00DC653F /* TheAppClip.app in Embed App Clips */, + ); + name = "Embed App Clips"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + E212C64C291BE1DB000E4F65 /* R.swift */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = R.swift; path = ../..; sourceTree = ""; }; + E22057AB2C9C71D70070148F /* Colors@3x.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "Colors@3x.jpg"; sourceTree = ""; }; + E243EF912510DF9100DC653F /* MainUI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MainUI.app; sourceTree = BUILT_PRODUCTS_DIR; }; + E243EFAD2510E08D00DC653F /* TheAppClip.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TheAppClip.app; sourceTree = BUILT_PRODUCTS_DIR; }; + E243EFAF2510E08D00DC653F /* TheAppClipApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TheAppClipApp.swift; sourceTree = ""; }; + E243EFB12510E08D00DC653F /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + E243EFB32510E08E00DC653F /* ClipAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = ClipAssets.xcassets; sourceTree = ""; }; + E243EFB62510E08E00DC653F /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + E243EFB82510E08E00DC653F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E243EFB92510E08E00DC653F /* TheAppClip.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = TheAppClip.entitlements; sourceTree = ""; }; + E243EFC22510E0D900DC653F /* Rswift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Rswift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E2A7F4712CD799F300FCB116 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.intentdefinition; name = Base; path = Base.lproj/MySiriIntents.intentdefinition; sourceTree = ""; }; + E2A7F47C2CD79A0F00FCB116 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/MySiriIntents.strings; sourceTree = ""; }; + E2A7F4B52CD7A25100FCB116 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + E2A7F4B82CD7A25500FCB116 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ + E22058272C9CB6AE0070148F /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Nogeeen/person.png, + ); + target = E243EF902510DF9100DC653F /* MainUI */; + }; + E220582B2C9CB71A0070148F /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + User.png, + ); + target = E243EFAC2510E08D00DC653F /* TheAppClip */; + }; + E25226AE2C9C612000F32501 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = E243EF902510DF9100DC653F /* MainUI */; + }; + E25226AF2C9C612000F32501 /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + /Localized/MyStoryboard.storyboard, + Assets.xcassets, + ); + target = E243EFAC2510E08D00DC653F /* TheAppClip */; + }; +/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + E2187D462CCC4ED800F33259 /* Folder2 */ = { + isa = PBXFileSystemSynchronizedRootGroup; + explicitFileTypes = { + }; + explicitFolders = ( + ); + path = Folder2; + sourceTree = ""; + }; + E22057F22C9C95EC0070148F /* Folder1 */ = { + isa = PBXFileSystemSynchronizedRootGroup; + explicitFileTypes = { + }; + explicitFolders = ( + ); + path = Folder1; + sourceTree = ""; + }; + E22058252C9CB6A20070148F /* Inner group */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + E22058272C9CB6AE0070148F /* PBXFileSystemSynchronizedBuildFileExceptionSet */, + E220582B2C9CB71A0070148F /* PBXFileSystemSynchronizedBuildFileExceptionSet */, + ); + explicitFileTypes = { + }; + explicitFolders = ( + ); + path = "Inner group"; + sourceTree = ""; + }; + E25226A62C9C612000F32501 /* MainUI */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + E25226AE2C9C612000F32501 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, + E25226AF2C9C612000F32501 /* PBXFileSystemSynchronizedBuildFileExceptionSet */, + ); + explicitFileTypes = { + }; + explicitFolders = ( + ); + path = MainUI; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + E243EF8E2510DF9100DC653F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E212C64E291BE24B000E4F65 /* RswiftLibrary in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E243EFAA2510E08D00DC653F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E212C650291BE252000E4F65 /* RswiftLibrary in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + E212C64B291BE1DB000E4F65 /* Packages */ = { + isa = PBXGroup; + children = ( + E212C64C291BE1DB000E4F65 /* R.swift */, + ); + name = Packages; + sourceTree = ""; + }; + E22057AC2C9C71D70070148F /* Subdir */ = { + isa = PBXGroup; + children = ( + E22057AB2C9C71D70070148F /* Colors@3x.jpg */, + E22058252C9CB6A20070148F /* Inner group */, + ); + path = Subdir; + sourceTree = ""; + }; + E22057F32C9C95F50070148F /* Group1 */ = { + isa = PBXGroup; + children = ( + E2187D462CCC4ED800F33259 /* Folder2 */, + E22057F22C9C95EC0070148F /* Folder1 */, + E2A7F4722CD799F300FCB116 /* MySiriIntents.intentdefinition */, + ); + path = Group1; + sourceTree = ""; + }; + E243EF882510DF9100DC653F = { + isa = PBXGroup; + children = ( + E212C64B291BE1DB000E4F65 /* Packages */, + E25226A62C9C612000F32501 /* MainUI */, + E243EFAE2510E08D00DC653F /* TheAppClip */, + E243EF922510DF9100DC653F /* Products */, + E243EFC12510E0D900DC653F /* Frameworks */, + ); + sourceTree = ""; + }; + E243EF922510DF9100DC653F /* Products */ = { + isa = PBXGroup; + children = ( + E243EF912510DF9100DC653F /* MainUI.app */, + E243EFAD2510E08D00DC653F /* TheAppClip.app */, + ); + name = Products; + sourceTree = ""; + }; + E243EFAE2510E08D00DC653F /* TheAppClip */ = { + isa = PBXGroup; + children = ( + E22057F32C9C95F50070148F /* Group1 */, + E22057AC2C9C71D70070148F /* Subdir */, + E243EFAF2510E08D00DC653F /* TheAppClipApp.swift */, + E243EFB12510E08D00DC653F /* ContentView.swift */, + E243EFB32510E08E00DC653F /* ClipAssets.xcassets */, + E243EFB82510E08E00DC653F /* Info.plist */, + E243EFB92510E08E00DC653F /* TheAppClip.entitlements */, + E243EFB52510E08E00DC653F /* Preview Content */, + E2A7F4B42CD7A25100FCB116 /* Localizable.strings */, + ); + path = TheAppClip; + sourceTree = ""; + }; + E243EFB52510E08E00DC653F /* Preview Content */ = { + isa = PBXGroup; + children = ( + E243EFB62510E08E00DC653F /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + E243EFC12510E0D900DC653F /* Frameworks */ = { + isa = PBXGroup; + children = ( + E243EFC22510E0D900DC653F /* Rswift.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + E243EF902510DF9100DC653F /* MainUI */ = { + isa = PBXNativeTarget; + buildConfigurationList = E243EFA02510DF9200DC653F /* Build configuration list for PBXNativeTarget "MainUI" */; + buildPhases = ( + E243EF8D2510DF9100DC653F /* Sources */, + E243EF8E2510DF9100DC653F /* Frameworks */, + E243EF8F2510DF9100DC653F /* Resources */, + E243EFBD2510E08E00DC653F /* Embed App Clips */, + ); + buildRules = ( + ); + dependencies = ( + E212C655291BE2D9000E4F65 /* PBXTargetDependency */, + E243EFBB2510E08E00DC653F /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + E25226A62C9C612000F32501 /* MainUI */, + ); + name = MainUI; + packageProductDependencies = ( + E212C64D291BE24B000E4F65 /* RswiftLibrary */, + ); + productName = MainUI; + productReference = E243EF912510DF9100DC653F /* MainUI.app */; + productType = "com.apple.product-type.application"; + }; + E243EFAC2510E08D00DC653F /* TheAppClip */ = { + isa = PBXNativeTarget; + buildConfigurationList = E243EFC02510E08E00DC653F /* Build configuration list for PBXNativeTarget "TheAppClip" */; + buildPhases = ( + E243EFA92510E08D00DC653F /* Sources */, + E243EFAA2510E08D00DC653F /* Frameworks */, + E243EFAB2510E08D00DC653F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + E212C652291BE2C0000E4F65 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + E2187D462CCC4ED800F33259 /* Folder2 */, + E22057F22C9C95EC0070148F /* Folder1 */, + ); + name = TheAppClip; + packageProductDependencies = ( + E212C64F291BE252000E4F65 /* RswiftLibrary */, + ); + productName = TheAppClip; + productReference = E243EFAD2510E08D00DC653F /* TheAppClip.app */; + productType = "com.apple.product-type.application.on-demand-install-capable"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E243EF892510DF9100DC653F /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastSwiftUpdateCheck = 1200; + LastUpgradeCheck = 1500; + TargetAttributes = { + E243EF902510DF9100DC653F = { + CreatedOnToolsVersion = 12.0; + }; + E243EFAC2510E08D00DC653F = { + CreatedOnToolsVersion = 12.0; + }; + }; + }; + buildConfigurationList = E243EF8C2510DF9100DC653F /* Build configuration list for PBXProject "FileSystemSynchronized" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + nl, + ); + mainGroup = E243EF882510DF9100DC653F; + packageReferences = ( + E2A7F4B12CD7A1D500FCB116 /* XCLocalSwiftPackageReference "../../../R.swift" */, + ); + preferredProjectObjectVersion = 50; + productRefGroup = E243EF922510DF9100DC653F /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + E243EF902510DF9100DC653F /* MainUI */, + E243EFAC2510E08D00DC653F /* TheAppClip */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + E243EF8F2510DF9100DC653F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E2A7F4B72CD7A25100FCB116 /* Localizable.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E243EFAB2510E08D00DC653F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E243EFB72510E08E00DC653F /* Preview Assets.xcassets in Resources */, + E2A7F4B62CD7A25100FCB116 /* Localizable.strings in Resources */, + E243EFB42510E08E00DC653F /* ClipAssets.xcassets in Resources */, + E22057AE2C9C71D70070148F /* Colors@3x.jpg in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + E243EF8D2510DF9100DC653F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E2A7F4732CD799F300FCB116 /* MySiriIntents.intentdefinition in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E243EFA92510E08D00DC653F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E2A7F4742CD799F300FCB116 /* MySiriIntents.intentdefinition in Sources */, + E243EFB22510E08D00DC653F /* ContentView.swift in Sources */, + E243EFB02510E08D00DC653F /* TheAppClipApp.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + E212C652291BE2C0000E4F65 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + productRef = E212C651291BE2C0000E4F65 /* RswiftGenerateInternalResources */; + }; + E212C655291BE2D9000E4F65 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + productRef = E212C654291BE2D9000E4F65 /* RswiftGenerateInternalResources */; + }; + E243EFBB2510E08E00DC653F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = E243EFAC2510E08D00DC653F /* TheAppClip */; + targetProxy = E243EFBA2510E08E00DC653F /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + E2A7F4722CD799F300FCB116 /* MySiriIntents.intentdefinition */ = { + isa = PBXVariantGroup; + children = ( + E2A7F4712CD799F300FCB116 /* Base */, + E2A7F47C2CD79A0F00FCB116 /* nl */, + ); + name = MySiriIntents.intentdefinition; + sourceTree = ""; + }; + E2A7F4B42CD7A25100FCB116 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + E2A7F4B52CD7A25100FCB116 /* en */, + E2A7F4B82CD7A25500FCB116 /* nl */, + ); + name = Localizable.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + E243EF9E2510DF9200DC653F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + E243EF9F2510DF9200DC653F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + E243EFA12510DF9200DC653F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"MainUI/Preview Content\""; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = MainUI/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.MainUI; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + E243EFA22510DF9200DC653F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"MainUI/Preview Content\""; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = MainUI/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.MainUI; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + E243EFBE2510E08E00DC653F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = TheAppClip/TheAppClip.entitlements; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"TheAppClip/Preview Content\""; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = TheAppClip/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.MainUI.Clip; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + E243EFBF2510E08E00DC653F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = TheAppClip/TheAppClip.entitlements; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"TheAppClip/Preview Content\""; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = TheAppClip/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = nl.mathijskadijk.MainUI.Clip; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E243EF8C2510DF9100DC653F /* Build configuration list for PBXProject "FileSystemSynchronized" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E243EF9E2510DF9200DC653F /* Debug */, + E243EF9F2510DF9200DC653F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E243EFA02510DF9200DC653F /* Build configuration list for PBXNativeTarget "MainUI" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E243EFA12510DF9200DC653F /* Debug */, + E243EFA22510DF9200DC653F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E243EFC02510E08E00DC653F /* Build configuration list for PBXNativeTarget "TheAppClip" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E243EFBE2510E08E00DC653F /* Debug */, + E243EFBF2510E08E00DC653F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + E2A7F4B12CD7A1D500FCB116 /* XCLocalSwiftPackageReference "../../../R.swift" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = ../../../R.swift; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + E212C64D291BE24B000E4F65 /* RswiftLibrary */ = { + isa = XCSwiftPackageProductDependency; + productName = RswiftLibrary; + }; + E212C64F291BE252000E4F65 /* RswiftLibrary */ = { + isa = XCSwiftPackageProductDependency; + productName = RswiftLibrary; + }; + E212C651291BE2C0000E4F65 /* RswiftGenerateInternalResources */ = { + isa = XCSwiftPackageProductDependency; + productName = "plugin:RswiftGenerateInternalResources"; + }; + E212C654291BE2D9000E4F65 /* RswiftGenerateInternalResources */ = { + isa = XCSwiftPackageProductDependency; + productName = "plugin:RswiftGenerateInternalResources"; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = E243EF892510DF9100DC653F /* Project object */; +} diff --git a/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Examples/FileSystemSynchronized/FileSystemSynchronized.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 66% rename from LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Examples/FileSystemSynchronized/FileSystemSynchronized.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 593ee26a..919434a6 100644 --- a/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/Examples/FileSystemSynchronized/FileSystemSynchronized.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/Examples/RswiftExamples.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Examples/FileSystemSynchronized/FileSystemSynchronized.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from Examples/RswiftExamples.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Examples/FileSystemSynchronized/FileSystemSynchronized.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Examples/FileSystemSynchronized/MainUI/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/FileSystemSynchronized/MainUI/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..9221b9bb --- /dev/null +++ b/Examples/FileSystemSynchronized/MainUI/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/FileSystemSynchronized/MainUI/Assets.xcassets/Contents.json b/Examples/FileSystemSynchronized/MainUI/Assets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/Examples/FileSystemSynchronized/MainUI/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/FileSystemSynchronized/MainUI/Assets.xcassets/hand.ignoreme.imageset/Contents.json b/Examples/FileSystemSynchronized/MainUI/Assets.xcassets/hand.ignoreme.imageset/Contents.json new file mode 100644 index 00000000..7b072ada --- /dev/null +++ b/Examples/FileSystemSynchronized/MainUI/Assets.xcassets/hand.ignoreme.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "hand.ignoreme.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/FileSystemSynchronized/MainUI/Assets.xcassets/hand.ignoreme.imageset/hand.ignoreme.png b/Examples/FileSystemSynchronized/MainUI/Assets.xcassets/hand.ignoreme.imageset/hand.ignoreme.png new file mode 100644 index 00000000..2f16685f Binary files /dev/null and b/Examples/FileSystemSynchronized/MainUI/Assets.xcassets/hand.ignoreme.imageset/hand.ignoreme.png differ diff --git a/Examples/FileSystemSynchronized/MainUI/Base.lproj/MyStoryboard.storyboard b/Examples/FileSystemSynchronized/MainUI/Base.lproj/MyStoryboard.storyboard new file mode 100644 index 00000000..e3c8e072 --- /dev/null +++ b/Examples/FileSystemSynchronized/MainUI/Base.lproj/MyStoryboard.storyboard @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/FileSystemSynchronized/MainUI/ContentView.swift b/Examples/FileSystemSynchronized/MainUI/ContentView.swift new file mode 100644 index 00000000..0c42e42a --- /dev/null +++ b/Examples/FileSystemSynchronized/MainUI/ContentView.swift @@ -0,0 +1,26 @@ +// +// ContentView.swift +// MainUI +// +// Created by Tom Lokhorst on 2020-09-15. +// + +import SwiftUI + +struct ContentView: View { + var body: some View { + Text("Hello, SwiftUI App!") + .padding() + + Image(R.image.handIgnoreme) + .resizable() + .aspectRatio(1, contentMode: .fit) + .frame(width: 140) + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/Examples/FileSystemSynchronized/MainUI/Folder3 copy/Folder3 copy 2/hand3 three.png b/Examples/FileSystemSynchronized/MainUI/Folder3 copy/Folder3 copy 2/hand3 three.png new file mode 100644 index 00000000..2f16685f Binary files /dev/null and b/Examples/FileSystemSynchronized/MainUI/Folder3 copy/Folder3 copy 2/hand3 three.png differ diff --git a/Examples/FileSystemSynchronized/MainUI/Folder3 copy/Folder3 copy 2/hand3-two.png b/Examples/FileSystemSynchronized/MainUI/Folder3 copy/Folder3 copy 2/hand3-two.png new file mode 100644 index 00000000..2f16685f Binary files /dev/null and b/Examples/FileSystemSynchronized/MainUI/Folder3 copy/Folder3 copy 2/hand3-two.png differ diff --git a/Examples/FileSystemSynchronized/MainUI/Folder3 copy/hand2 three.png b/Examples/FileSystemSynchronized/MainUI/Folder3 copy/hand2 three.png new file mode 100644 index 00000000..2f16685f Binary files /dev/null and b/Examples/FileSystemSynchronized/MainUI/Folder3 copy/hand2 three.png differ diff --git a/Examples/FileSystemSynchronized/MainUI/Folder3 copy/hand2-two.png b/Examples/FileSystemSynchronized/MainUI/Folder3 copy/hand2-two.png new file mode 100644 index 00000000..2f16685f Binary files /dev/null and b/Examples/FileSystemSynchronized/MainUI/Folder3 copy/hand2-two.png differ diff --git a/Examples/FileSystemSynchronized/MainUI/Info.plist b/Examples/FileSystemSynchronized/MainUI/Info.plist new file mode 100644 index 00000000..bf622789 --- /dev/null +++ b/Examples/FileSystemSynchronized/MainUI/Info.plist @@ -0,0 +1,54 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + NSUserActivityTypes + + FirstIntentIntent + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + UIApplicationSupportsIndirectInputEvents + + UILaunchScreen + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Examples/RswiftExamples.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Examples/FileSystemSynchronized/MainUI/MainUI.entitlements similarity index 69% rename from Examples/RswiftExamples.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to Examples/FileSystemSynchronized/MainUI/MainUI.entitlements index 0c67376e..2eb7e333 100644 --- a/Examples/RswiftExamples.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ b/Examples/FileSystemSynchronized/MainUI/MainUI.entitlements @@ -1,5 +1,8 @@ - + + com.apple.security.application-groups + + diff --git a/Examples/FileSystemSynchronized/MainUI/MainUIApp.swift b/Examples/FileSystemSynchronized/MainUI/MainUIApp.swift new file mode 100644 index 00000000..d0c26ad7 --- /dev/null +++ b/Examples/FileSystemSynchronized/MainUI/MainUIApp.swift @@ -0,0 +1,37 @@ +// +// MainUIApp.swift +// MainUI +// +// Created by Tom Lokhorst on 2020-09-15. +// + +import SwiftUI + +@main +struct MainUIApp: App { + var body: some Scene { + WindowGroup { + ContentView() + .onAppear { + // From Assets (in this target) + print(R.image.handIgnoreme()!) + + // From root folder (in this target) + print(R.image.user1()!) + print(R.storyboard.myStoryboard.instantiateInitialViewController()!) + + // From Folders3 copy (in this target) + print(R.image.hand3Two()!) + print(R.image.hand3Three()!) + print(R.image.hand2Two()!) + print(R.image.hand2Three()!) + + // From Subdir (in TheAppClip target) + print(R.image.person()!) + + // From root folder (in TheAppClip target) + print(R.string.localizable.helloWorld()) + } + } + } +} diff --git a/Examples/FileSystemSynchronized/MainUI/Preview Content/Preview Assets.xcassets/Contents.json b/Examples/FileSystemSynchronized/MainUI/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/Examples/FileSystemSynchronized/MainUI/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/FileSystemSynchronized/MainUI/User1.png b/Examples/FileSystemSynchronized/MainUI/User1.png new file mode 100644 index 00000000..4f5cafee Binary files /dev/null and b/Examples/FileSystemSynchronized/MainUI/User1.png differ diff --git a/Examples/FileSystemSynchronized/MainUI/View.xib b/Examples/FileSystemSynchronized/MainUI/View.xib new file mode 100644 index 00000000..c719e3e5 --- /dev/null +++ b/Examples/FileSystemSynchronized/MainUI/View.xib @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/FileSystemSynchronized/MainUI/nl.lproj/MyStoryboard.strings b/Examples/FileSystemSynchronized/MainUI/nl.lproj/MyStoryboard.strings new file mode 100644 index 00000000..12f73c17 --- /dev/null +++ b/Examples/FileSystemSynchronized/MainUI/nl.lproj/MyStoryboard.strings @@ -0,0 +1,6 @@ + +/* Class = "UILabel"; text = "Second label"; ObjectID = "cgd-Ta-I3o"; */ +"cgd-Ta-I3o.text" = "Tweede label"; + +/* Class = "UILabel"; text = "The first"; ObjectID = "oox-ej-MK4"; */ +"oox-ej-MK4.text" = "De eerste"; diff --git a/Examples/FileSystemSynchronized/TheAppClip/ClipAssets.xcassets/Contents.json b/Examples/FileSystemSynchronized/TheAppClip/ClipAssets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/Examples/FileSystemSynchronized/TheAppClip/ClipAssets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/FileSystemSynchronized/TheAppClip/ClipAssets.xcassets/MyColor.colorset/Contents.json b/Examples/FileSystemSynchronized/TheAppClip/ClipAssets.xcassets/MyColor.colorset/Contents.json new file mode 100644 index 00000000..256e568e --- /dev/null +++ b/Examples/FileSystemSynchronized/TheAppClip/ClipAssets.xcassets/MyColor.colorset/Contents.json @@ -0,0 +1,28 @@ +{ + "colors" : [ + { + "color" : { + "platform" : "ios", + "reference" : "systemTealColor" + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "platform" : "ios", + "reference" : "systemOrangeColor" + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/FileSystemSynchronized/TheAppClip/ContentView.swift b/Examples/FileSystemSynchronized/TheAppClip/ContentView.swift new file mode 100644 index 00000000..87223794 --- /dev/null +++ b/Examples/FileSystemSynchronized/TheAppClip/ContentView.swift @@ -0,0 +1,27 @@ +// +// ContentView.swift +// TheAppClip +// +// Created by Tom Lokhorst on 2020-09-15. +// + +import SwiftUI + +struct ContentView: View { + var body: some View { + Text("Hello, App Clip!") + .padding() + + Image(R.image.handIgnoreme) + .resizable() + .aspectRatio(1, contentMode: .fit) + .frame(width: 140) + .border(Color(R.color.myColor)) + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/Examples/FileSystemSynchronized/TheAppClip/Group1/Base.lproj/MySiriIntents.intentdefinition b/Examples/FileSystemSynchronized/TheAppClip/Group1/Base.lproj/MySiriIntents.intentdefinition new file mode 100644 index 00000000..a91fa971 --- /dev/null +++ b/Examples/FileSystemSynchronized/TheAppClip/Group1/Base.lproj/MySiriIntents.intentdefinition @@ -0,0 +1,79 @@ + + + + + INEnums + + INIntentDefinitionModelVersion + 1.2 + INIntentDefinitionNamespace + CfVXCE + INIntentDefinitionSystemVersion + 24A348 + INIntentDefinitionToolsBuildVersion + 16A242d + INIntentDefinitionToolsVersion + 16.0 + INIntents + + + INIntentCategory + generic + INIntentConfigurable + + INIntentDescription + the description + INIntentDescriptionID + 0yVZNa + INIntentManagedParameterCombinations + + + + INIntentParameterCombinationSupportsBackgroundExecution + + INIntentParameterCombinationUpdatesLinked + + + + INIntentName + FirstIntent + INIntentParameterCombinations + + + + INIntentParameterCombinationIsPrimary + + INIntentParameterCombinationSupportsBackgroundExecution + + + + INIntentResponse + + INIntentResponseCodes + + + INIntentResponseCodeName + success + INIntentResponseCodeSuccess + + + + INIntentResponseCodeName + failure + + + + INIntentTitle + First Intent + INIntentTitleID + YPNLgh + INIntentType + Custom + INIntentVerb + Do + + + INTypes + + + diff --git a/Examples/FileSystemSynchronized/TheAppClip/Group1/Folder1/.gitkeep b/Examples/FileSystemSynchronized/TheAppClip/Group1/Folder1/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/Examples/FileSystemSynchronized/TheAppClip/Group1/Folder2/Folder3 copy 2/hand3 three.png b/Examples/FileSystemSynchronized/TheAppClip/Group1/Folder2/Folder3 copy 2/hand3 three.png new file mode 100644 index 00000000..2f16685f Binary files /dev/null and b/Examples/FileSystemSynchronized/TheAppClip/Group1/Folder2/Folder3 copy 2/hand3 three.png differ diff --git a/Examples/FileSystemSynchronized/TheAppClip/Group1/Folder2/Folder3 copy 2/hand3-two.png b/Examples/FileSystemSynchronized/TheAppClip/Group1/Folder2/Folder3 copy 2/hand3-two.png new file mode 100644 index 00000000..2f16685f Binary files /dev/null and b/Examples/FileSystemSynchronized/TheAppClip/Group1/Folder2/Folder3 copy 2/hand3-two.png differ diff --git a/Examples/FileSystemSynchronized/TheAppClip/Group1/Folder2/hand three.png b/Examples/FileSystemSynchronized/TheAppClip/Group1/Folder2/hand three.png new file mode 100644 index 00000000..2f16685f Binary files /dev/null and b/Examples/FileSystemSynchronized/TheAppClip/Group1/Folder2/hand three.png differ diff --git a/Examples/FileSystemSynchronized/TheAppClip/Group1/Folder2/hand-two.png b/Examples/FileSystemSynchronized/TheAppClip/Group1/Folder2/hand-two.png new file mode 100644 index 00000000..2f16685f Binary files /dev/null and b/Examples/FileSystemSynchronized/TheAppClip/Group1/Folder2/hand-two.png differ diff --git a/Examples/FileSystemSynchronized/TheAppClip/Group1/nl.lproj/MySiriIntents.strings b/Examples/FileSystemSynchronized/TheAppClip/Group1/nl.lproj/MySiriIntents.strings new file mode 100644 index 00000000..01dc57c0 --- /dev/null +++ b/Examples/FileSystemSynchronized/TheAppClip/Group1/nl.lproj/MySiriIntents.strings @@ -0,0 +1,4 @@ +"0yVZNa" = "de omschrijving"; + +"YPNLgh" = "Eerste Intent"; + diff --git a/Examples/FileSystemSynchronized/TheAppClip/Info.plist b/Examples/FileSystemSynchronized/TheAppClip/Info.plist new file mode 100644 index 00000000..3c6b8e74 --- /dev/null +++ b/Examples/FileSystemSynchronized/TheAppClip/Info.plist @@ -0,0 +1,56 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + MainUI + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + NSUserActivityTypes + + FirstIntentIntent + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + UIApplicationSupportsIndirectInputEvents + + UILaunchScreen + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Examples/FileSystemSynchronized/TheAppClip/Preview Content/Preview Assets.xcassets/Contents.json b/Examples/FileSystemSynchronized/TheAppClip/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/Examples/FileSystemSynchronized/TheAppClip/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Examples/FileSystemSynchronized/TheAppClip/Subdir/Colors@3x.jpg b/Examples/FileSystemSynchronized/TheAppClip/Subdir/Colors@3x.jpg new file mode 100644 index 00000000..23c056a8 Binary files /dev/null and b/Examples/FileSystemSynchronized/TheAppClip/Subdir/Colors@3x.jpg differ diff --git a/Examples/FileSystemSynchronized/TheAppClip/Subdir/Inner group/Nogeeen/person.png b/Examples/FileSystemSynchronized/TheAppClip/Subdir/Inner group/Nogeeen/person.png new file mode 100644 index 00000000..4f5cafee Binary files /dev/null and b/Examples/FileSystemSynchronized/TheAppClip/Subdir/Inner group/Nogeeen/person.png differ diff --git a/Examples/FileSystemSynchronized/TheAppClip/Subdir/Inner group/User.png b/Examples/FileSystemSynchronized/TheAppClip/Subdir/Inner group/User.png new file mode 100644 index 00000000..4f5cafee Binary files /dev/null and b/Examples/FileSystemSynchronized/TheAppClip/Subdir/Inner group/User.png differ diff --git a/Examples/FileSystemSynchronized/TheAppClip/TheAppClip.entitlements b/Examples/FileSystemSynchronized/TheAppClip/TheAppClip.entitlements new file mode 100644 index 00000000..e9b68f06 --- /dev/null +++ b/Examples/FileSystemSynchronized/TheAppClip/TheAppClip.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.developer.parent-application-identifiers + + $(AppIdentifierPrefix)nl.mathijskadijk.MainUI + + + diff --git a/Examples/FileSystemSynchronized/TheAppClip/TheAppClipApp.swift b/Examples/FileSystemSynchronized/TheAppClip/TheAppClipApp.swift new file mode 100644 index 00000000..77d8c0a0 --- /dev/null +++ b/Examples/FileSystemSynchronized/TheAppClip/TheAppClipApp.swift @@ -0,0 +1,41 @@ +// +// TheAppClipApp.swift +// TheAppClip +// +// Created by Tom Lokhorst on 2020-09-15. +// + +import SwiftUI + +@main +struct TheAppClipApp: App { + var body: some Scene { + WindowGroup { + ContentView() + .onAppear { + // From ClipAssets (in this target) + print(R.color.myColor()!) + + // From Group1 (in this target) + print(R.image.handTwo()!) + print(R.image.handThree()!) + print(R.image.hand3Two()!) + print(R.image.hand3Three()!) + print(R.image.hand3Three()!) + + // From Subdir (in this target) + print(R.image.colorsJpg()!) + print(R.image.user()!) + + // From root folder (in this target) + print(R.string.localizable.helloWorld()) + + // From Assets (in MainUI) + print(R.image.handIgnoreme()!) + + // From root folder (in MainUI) + print(R.storyboard.myStoryboard.instantiateInitialViewController()!) + } + } + } +} diff --git a/Examples/FileSystemSynchronized/TheAppClip/en.lproj/Localizable.strings b/Examples/FileSystemSynchronized/TheAppClip/en.lproj/Localizable.strings new file mode 100644 index 00000000..2f8de292 --- /dev/null +++ b/Examples/FileSystemSynchronized/TheAppClip/en.lproj/Localizable.strings @@ -0,0 +1,9 @@ +/* + Localizable.strings + FileSystemSynchronized + + Created by Tom Lokhorst on 2024-11-03. + +*/ + +"hello.world" = "Hello world"; diff --git a/Examples/FileSystemSynchronized/TheAppClip/nl.lproj/Localizable.strings b/Examples/FileSystemSynchronized/TheAppClip/nl.lproj/Localizable.strings new file mode 100644 index 00000000..346fe5b8 --- /dev/null +++ b/Examples/FileSystemSynchronized/TheAppClip/nl.lproj/Localizable.strings @@ -0,0 +1,9 @@ +/* + Localizable.strings + FileSystemSynchronized + + Created by Tom Lokhorst on 2024-11-03. + +*/ + +"hello.world" = "Hallo wereld"; diff --git a/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.pbxproj b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.pbxproj similarity index 77% rename from LocalizedStringApp/LocalizedStringApp.xcodeproj/project.pbxproj rename to Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.pbxproj index c81f6c45..75d804bf 100644 --- a/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.pbxproj +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.pbxproj @@ -3,12 +3,11 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ - 4BBE4418B51EC4EA7E8ED322 /* libPods-LocalizedStringApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E8A7683B1C7BA67F4482933 /* libPods-LocalizedStringApp.a */; }; - 76F4720C6B697E9677FA72D7 /* libPods-LocalizedStringAppTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B0E837DDBD8F520F45BD3C01 /* libPods-LocalizedStringAppTests.a */; }; + E258099B29325C1F008EA19C /* ten.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = E258099929325C1F008EA19C /* ten.stringsdict */; }; E264FBA12319055A008E0DB5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E264FBA02319055A008E0DB5 /* AppDelegate.swift */; }; E264FBB82319055D008E0DB5 /* LocalizedStringAppTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E264FBB72319055D008E0DB5 /* LocalizedStringAppTests.swift */; }; E264FBCF2319082F008E0DB5 /* one.strings in Resources */ = {isa = PBXBuildFile; fileRef = E264FBCE2319082E008E0DB5 /* one.strings */; }; @@ -19,8 +18,8 @@ E264FBE223190A19008E0DB5 /* six.strings in Resources */ = {isa = PBXBuildFile; fileRef = E264FBE023190A19008E0DB5 /* six.strings */; }; E264FBE623190A2F008E0DB5 /* seven.strings in Resources */ = {isa = PBXBuildFile; fileRef = E264FBE423190A2F008E0DB5 /* seven.strings */; }; E264FBEB23190A49008E0DB5 /* eight.strings in Resources */ = {isa = PBXBuildFile; fileRef = E264FBE923190A49008E0DB5 /* eight.strings */; }; - E264FBF023190BD4008E0DB5 /* R.generated.swift in Sources */ = {isa = PBXBuildFile; fileRef = E264FBEF23190BD4008E0DB5 /* R.generated.swift */; }; E264FBF4231A7335008E0DB5 /* nine.strings in Resources */ = {isa = PBXBuildFile; fileRef = E264FBF6231A7335008E0DB5 /* nine.strings */; }; + E2E58371291D3AC2006E17D9 /* RswiftLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = E2E58370291D3AC2006E17D9 /* RswiftLibrary */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -34,12 +33,8 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 1D03B0D9A8F18724B68DD0FB /* Pods-LocalizedStringApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LocalizedStringApp.debug.xcconfig"; path = "Target Support Files/Pods-LocalizedStringApp/Pods-LocalizedStringApp.debug.xcconfig"; sourceTree = ""; }; - 2B3837A07F59517ABA7B025C /* Pods-LocalizedStringAppTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LocalizedStringAppTests.release.xcconfig"; path = "Target Support Files/Pods-LocalizedStringAppTests/Pods-LocalizedStringAppTests.release.xcconfig"; sourceTree = ""; }; - 388F2C098F37BE577962EE06 /* Pods-LocalizedStringAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LocalizedStringAppTests.debug.xcconfig"; path = "Target Support Files/Pods-LocalizedStringAppTests/Pods-LocalizedStringAppTests.debug.xcconfig"; sourceTree = ""; }; - 9E8A7683B1C7BA67F4482933 /* libPods-LocalizedStringApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-LocalizedStringApp.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - B0E837DDBD8F520F45BD3C01 /* libPods-LocalizedStringAppTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-LocalizedStringAppTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - C6B891777D84DD950FA5FFB4 /* Pods-LocalizedStringApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LocalizedStringApp.release.xcconfig"; path = "Target Support Files/Pods-LocalizedStringApp/Pods-LocalizedStringApp.release.xcconfig"; sourceTree = ""; }; + E258099A29325C1F008EA19C /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = fr; path = fr.lproj/ten.stringsdict; sourceTree = ""; }; + E258099C29325C29008EA19C /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = nl; path = nl.lproj/ten.stringsdict; sourceTree = ""; }; E264FB9D2319055A008E0DB5 /* LocalizedStringApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LocalizedStringApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; E264FBA02319055A008E0DB5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; E264FBAE2319055D008E0DB5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -63,12 +58,12 @@ E264FBEA23190A49008E0DB5 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/eight.strings; sourceTree = ""; }; E264FBEC23190A5A008E0DB5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/eight.strings; sourceTree = ""; }; E264FBED23190A65008E0DB5 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/eight.strings; sourceTree = ""; }; - E264FBEF23190BD4008E0DB5 /* R.generated.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = R.generated.swift; sourceTree = ""; }; E264FBF1231A6984008E0DB5 /* en-GB */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "en-GB"; path = "en-GB.lproj/five.strings"; sourceTree = ""; }; E264FBF5231A7335008E0DB5 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/nine.strings; sourceTree = ""; }; E264FBF7231A7371008E0DB5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/nine.strings; sourceTree = ""; }; E264FBF8231A7392008E0DB5 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/nine.strings; sourceTree = ""; }; E264FBF9231A73BA008E0DB5 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/nine.strings; sourceTree = ""; }; + E2E5836E291D3AB5006E17D9 /* R.swift */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = R.swift; path = ../..; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -76,7 +71,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4BBE4418B51EC4EA7E8ED322 /* libPods-LocalizedStringApp.a in Frameworks */, + E2E58371291D3AC2006E17D9 /* RswiftLibrary in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -84,44 +79,24 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 76F4720C6B697E9677FA72D7 /* libPods-LocalizedStringAppTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 2B4C6133AC39DF6B72B0EE6E /* Frameworks */ = { - isa = PBXGroup; - children = ( - 9E8A7683B1C7BA67F4482933 /* libPods-LocalizedStringApp.a */, - B0E837DDBD8F520F45BD3C01 /* libPods-LocalizedStringAppTests.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - 5E55C1A9CC154E8588A1B6F3 /* Pods */ = { - isa = PBXGroup; - children = ( - 1D03B0D9A8F18724B68DD0FB /* Pods-LocalizedStringApp.debug.xcconfig */, - C6B891777D84DD950FA5FFB4 /* Pods-LocalizedStringApp.release.xcconfig */, - 388F2C098F37BE577962EE06 /* Pods-LocalizedStringAppTests.debug.xcconfig */, - 2B3837A07F59517ABA7B025C /* Pods-LocalizedStringAppTests.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; E264FB942319055A008E0DB5 = { isa = PBXGroup; children = ( - E264FBEF23190BD4008E0DB5 /* R.generated.swift */, + E2E5836D291D3AB5006E17D9 /* Packages */, E264FB9F2319055A008E0DB5 /* LocalizedStringApp */, E264FBB62319055D008E0DB5 /* LocalizedStringAppTests */, E264FB9E2319055A008E0DB5 /* Products */, - 5E55C1A9CC154E8588A1B6F3 /* Pods */, - 2B4C6133AC39DF6B72B0EE6E /* Frameworks */, + E2E5836F291D3AC2006E17D9 /* Frameworks */, ); + indentWidth = 2; sourceTree = ""; + tabWidth = 2; }; E264FB9E2319055A008E0DB5 /* Products */ = { isa = PBXGroup; @@ -146,6 +121,7 @@ E264FBE423190A2F008E0DB5 /* seven.strings */, E264FBE923190A49008E0DB5 /* eight.strings */, E264FBF6231A7335008E0DB5 /* nine.strings */, + E258099929325C1F008EA19C /* ten.stringsdict */, ); path = LocalizedStringApp; sourceTree = ""; @@ -159,6 +135,21 @@ path = LocalizedStringAppTests; sourceTree = ""; }; + E2E5836D291D3AB5006E17D9 /* Packages */ = { + isa = PBXGroup; + children = ( + E2E5836E291D3AB5006E17D9 /* R.swift */, + ); + name = Packages; + sourceTree = ""; + }; + E2E5836F291D3AC2006E17D9 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -166,8 +157,6 @@ isa = PBXNativeTarget; buildConfigurationList = E264FBBC2319055D008E0DB5 /* Build configuration list for PBXNativeTarget "LocalizedStringApp" */; buildPhases = ( - 39DE3C8105AEB010961037E4 /* [CP] Check Pods Manifest.lock */, - E264FBEE23190B03008E0DB5 /* R.swift */, E264FB992319055A008E0DB5 /* Sources */, E264FB9A2319055A008E0DB5 /* Frameworks */, E264FB9B2319055A008E0DB5 /* Resources */, @@ -175,8 +164,12 @@ buildRules = ( ); dependencies = ( + E2E58373291D3AD4006E17D9 /* PBXTargetDependency */, ); name = LocalizedStringApp; + packageProductDependencies = ( + E2E58370291D3AC2006E17D9 /* RswiftLibrary */, + ); productName = LocalizedStringApp; productReference = E264FB9D2319055A008E0DB5 /* LocalizedStringApp.app */; productType = "com.apple.product-type.application"; @@ -185,7 +178,6 @@ isa = PBXNativeTarget; buildConfigurationList = E264FBBF2319055D008E0DB5 /* Build configuration list for PBXNativeTarget "LocalizedStringAppTests" */; buildPhases = ( - 00D3DD3BE0DE0677D3835C0F /* [CP] Check Pods Manifest.lock */, E264FBAF2319055D008E0DB5 /* Sources */, E264FBB02319055D008E0DB5 /* Frameworks */, E264FBB12319055D008E0DB5 /* Resources */, @@ -207,7 +199,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1100; - LastUpgradeCheck = 1100; + LastUpgradeCheck = 1410; ORGANIZATIONNAME = R.swift; TargetAttributes = { E264FB9C2319055A008E0DB5 = { @@ -252,6 +244,7 @@ E264FBE223190A19008E0DB5 /* six.strings in Resources */, E264FBF4231A7335008E0DB5 /* nine.strings in Resources */, E264FBCF2319082F008E0DB5 /* one.strings in Resources */, + E258099B29325C1F008EA19C /* ten.stringsdict in Resources */, E264FBD22319083B008E0DB5 /* two.strings in Resources */, E264FBDD231909F6008E0DB5 /* five.strings in Resources */, E264FBE623190A2F008E0DB5 /* seven.strings in Resources */, @@ -269,80 +262,12 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 00D3DD3BE0DE0677D3835C0F /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-LocalizedStringAppTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 39DE3C8105AEB010961037E4 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-LocalizedStringApp-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - E264FBEE23190B03008E0DB5 /* R.swift */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "$(TEMP_DIR)/rswift-lastrun", - ); - name = R.swift; - outputFileListPaths = ( - ); - outputPaths = ( - $SRCROOT/R.generated.swift, - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"$SRCROOT/../build/Debug/rswift\" generate \"$SRCROOT/R.generated.swift\"\n"; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ E264FB992319055A008E0DB5 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E264FBA12319055A008E0DB5 /* AppDelegate.swift in Sources */, - E264FBF023190BD4008E0DB5 /* R.generated.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -362,9 +287,22 @@ target = E264FB9C2319055A008E0DB5 /* LocalizedStringApp */; targetProxy = E264FBB42319055D008E0DB5 /* PBXContainerItemProxy */; }; + E2E58373291D3AD4006E17D9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + productRef = E2E58372291D3AD4006E17D9 /* RswiftGenerateInternalResources */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ + E258099929325C1F008EA19C /* ten.stringsdict */ = { + isa = PBXVariantGroup; + children = ( + E258099A29325C1F008EA19C /* fr */, + E258099C29325C29008EA19C /* nl */, + ); + name = ten.stringsdict; + sourceTree = ""; + }; E264FBD02319083B008E0DB5 /* two.strings */ = { isa = PBXVariantGroup; children = ( @@ -449,6 +387,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -471,6 +410,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -495,7 +435,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -509,6 +449,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -531,6 +472,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -549,7 +491,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; @@ -561,7 +503,6 @@ }; E264FBBD2319055D008E0DB5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1D03B0D9A8F18724B68DD0FB /* Pods-LocalizedStringApp.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; @@ -580,7 +521,6 @@ }; E264FBBE2319055D008E0DB5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C6B891777D84DD950FA5FFB4 /* Pods-LocalizedStringApp.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; @@ -599,13 +539,11 @@ }; E264FBC02319055D008E0DB5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 388F2C098F37BE577962EE06 /* Pods-LocalizedStringAppTests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = LocalizedStringAppTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -621,13 +559,11 @@ }; E264FBC12319055D008E0DB5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2B3837A07F59517ABA7B025C /* Pods-LocalizedStringAppTests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = LocalizedStringAppTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -672,6 +608,17 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCSwiftPackageProductDependency section */ + E2E58370291D3AC2006E17D9 /* RswiftLibrary */ = { + isa = XCSwiftPackageProductDependency; + productName = RswiftLibrary; + }; + E2E58372291D3AD4006E17D9 /* RswiftGenerateInternalResources */ = { + isa = XCSwiftPackageProductDependency; + productName = "plugin:RswiftGenerateInternalResources"; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = E264FB952319055A008E0DB5 /* Project object */; } diff --git a/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 00000000..284750e1 --- /dev/null +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,23 @@ +{ + "pins" : [ + { + "identity" : "swift-argument-parser", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-argument-parser", + "state" : { + "revision" : "fddd1c00396eed152c45a46bea9f47b98e59301d", + "version" : "1.2.0" + } + }, + { + "identity" : "xcodeedit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/tomlokhorst/XcodeEdit", + "state" : { + "revision" : "cd466d6e8c5ffd2f2b61165d37b0646f09068e1e", + "version" : "2.9.0" + } + } + ], + "version" : 2 +} diff --git a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Dutch.xcscheme b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Dutch.xcscheme similarity index 97% rename from LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Dutch.xcscheme rename to Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Dutch.xcscheme index ccbe0368..62800d09 100644 --- a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Dutch.xcscheme +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Dutch.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES" + language = "nl"> diff --git a/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp English (GB).xcscheme b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp English (GB).xcscheme new file mode 100644 index 00000000..ad85e417 --- /dev/null +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp English (GB).xcscheme @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp English.xcscheme b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp English.xcscheme similarity index 97% rename from LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp English.xcscheme rename to Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp English.xcscheme index 42a8fc96..c07378b1 100644 --- a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp English.xcscheme +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp English.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES" + language = "en"> diff --git a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French (Canada).xcscheme b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French (Canada).xcscheme similarity index 97% rename from LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French (Canada).xcscheme rename to Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French (Canada).xcscheme index 44203c86..fb4dfd2f 100644 --- a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French (Canada).xcscheme +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French (Canada).xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES" + language = "fr-CA"> diff --git a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French.xcscheme b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French.xcscheme similarity index 97% rename from LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French.xcscheme rename to Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French.xcscheme index 87bc8e30..5c2a0c44 100644 --- a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French.xcscheme +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp French.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES" + language = "fr"> diff --git a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Turkish.xcscheme b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Turkish.xcscheme similarity index 97% rename from LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Turkish.xcscheme rename to Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Turkish.xcscheme index c1e4f955..b82f8bd9 100644 --- a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Turkish.xcscheme +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp Turkish.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES" + language = "tr"> diff --git a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp.xcscheme b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp.xcscheme similarity index 99% rename from LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp.xcscheme rename to Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp.xcscheme index 45d771c6..2c44d19e 100644 --- a/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp.xcscheme +++ b/Examples/LocalizedStringApp/LocalizedStringApp.xcodeproj/xcshareddata/xcschemes/LocalizedStringApp.xcscheme @@ -1,6 +1,6 @@ Bool { +/* let myprefs: [String] = ["fr-CA"] print("Locale.preferredLanguages:") @@ -124,7 +125,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { print(R.string.nine.nine3()) print(R.string.nine.nine3(preferredLanguages: myprefs)) print() - +*/ return true diff --git a/LocalizedStringApp/LocalizedStringApp/Base.lproj/eight.strings b/Examples/LocalizedStringApp/LocalizedStringApp/Base.lproj/eight.strings similarity index 65% rename from LocalizedStringApp/LocalizedStringApp/Base.lproj/eight.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/Base.lproj/eight.strings index 2d70c182..bdc1aed9 100644 --- a/LocalizedStringApp/LocalizedStringApp/Base.lproj/eight.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/Base.lproj/eight.strings @@ -9,3 +9,7 @@ "eight1" = "eight 1, localized base"; "eight2" = "eight 2, localized base"; "eight3" = "eight 3, localized base"; + +"eightArg1" = "eight 1 %@, localized base"; +"eightArg2" = "eight 2 %@, localized base"; +"eightArg3" = "eight 3 %@, localized base"; diff --git a/LocalizedStringApp/LocalizedStringApp/Base.lproj/nine.strings b/Examples/LocalizedStringApp/LocalizedStringApp/Base.lproj/nine.strings similarity index 65% rename from LocalizedStringApp/LocalizedStringApp/Base.lproj/nine.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/Base.lproj/nine.strings index a1c055bb..46c5d870 100644 --- a/LocalizedStringApp/LocalizedStringApp/Base.lproj/nine.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/Base.lproj/nine.strings @@ -9,3 +9,7 @@ "nine1" = "nine 1, localized base"; "nine2" = "nine 2, localized base"; "nine3" = "nine 3, localized base"; + +"nineArg1" = "nine 1 %@, localized base"; +"nineArg2" = "nine 2 %@, localized base"; +"nineArg3" = "nine 3 %@, localized base"; diff --git a/LocalizedStringApp/LocalizedStringApp/Info.plist b/Examples/LocalizedStringApp/LocalizedStringApp/Info.plist similarity index 100% rename from LocalizedStringApp/LocalizedStringApp/Info.plist rename to Examples/LocalizedStringApp/LocalizedStringApp/Info.plist diff --git a/LocalizedStringApp/LocalizedStringApp/ca.lproj/four.strings b/Examples/LocalizedStringApp/LocalizedStringApp/ca.lproj/four.strings similarity index 80% rename from LocalizedStringApp/LocalizedStringApp/ca.lproj/four.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/ca.lproj/four.strings index 034bb38a..2fce0fce 100644 --- a/LocalizedStringApp/LocalizedStringApp/ca.lproj/four.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/ca.lproj/four.strings @@ -7,3 +7,4 @@ */ "four1" = "four 1, localized catalan"; +"fourArg" = "four %@, localized catalan"; diff --git a/LocalizedStringApp/LocalizedStringApp/en-GB.lproj/five.strings b/Examples/LocalizedStringApp/LocalizedStringApp/en-GB.lproj/five.strings similarity index 77% rename from LocalizedStringApp/LocalizedStringApp/en-GB.lproj/five.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/en-GB.lproj/five.strings index a869aab1..5fc0e438 100644 --- a/LocalizedStringApp/LocalizedStringApp/en-GB.lproj/five.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/en-GB.lproj/five.strings @@ -7,3 +7,7 @@ */ "five1" = "five 1, localized english gb"; + + + +"fiveArg1" = "five 1 %@, localized english gb"; diff --git a/LocalizedStringApp/LocalizedStringApp/en.lproj/MyStoryboard.storyboard b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/MyStoryboard.storyboard similarity index 100% rename from LocalizedStringApp/LocalizedStringApp/en.lproj/MyStoryboard.storyboard rename to Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/MyStoryboard.storyboard diff --git a/LocalizedStringApp/LocalizedStringApp/en.lproj/five.strings b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/five.strings similarity index 65% rename from LocalizedStringApp/LocalizedStringApp/en.lproj/five.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/five.strings index 8b0ec1c2..9c634921 100644 --- a/LocalizedStringApp/LocalizedStringApp/en.lproj/five.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/five.strings @@ -9,3 +9,7 @@ "five1" = "five 1, localized english"; "five2" = "five 2, localized english"; "five3" = "five 3, localized english"; + +"fiveArg1" = "five 1 %@, localized english"; +"fiveArg2" = "five 2 %@, localized english"; +"fiveArg3" = "five 3 %@, localized english"; diff --git a/LocalizedStringApp/LocalizedStringApp/en.lproj/nine.strings b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/nine.strings similarity index 69% rename from LocalizedStringApp/LocalizedStringApp/en.lproj/nine.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/nine.strings index 354a35db..d25d64ca 100644 --- a/LocalizedStringApp/LocalizedStringApp/en.lproj/nine.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/nine.strings @@ -8,3 +8,7 @@ "nine1" = "nine 1, localized english"; "nine2" = "nine 2, localized english"; + + +"nineArg1" = "nine 1 %@, localized english"; +"nineArg2" = "nine 2 %@, localized english"; diff --git a/LocalizedStringApp/LocalizedStringApp/en.lproj/seven.strings b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/seven.strings similarity index 69% rename from LocalizedStringApp/LocalizedStringApp/en.lproj/seven.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/seven.strings index 6113ce2b..58bc679f 100644 --- a/LocalizedStringApp/LocalizedStringApp/en.lproj/seven.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/seven.strings @@ -8,3 +8,7 @@ "seven1" = "seven 1, localized english"; "seven2" = "seven 2, localized english"; + + +"sevenArg1" = "seven 1 %@, localized english"; +"sevenArg2" = "seven 2 %@, localized english"; diff --git a/LocalizedStringApp/LocalizedStringApp/en.lproj/three.strings b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/three.strings similarity index 69% rename from LocalizedStringApp/LocalizedStringApp/en.lproj/three.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/three.strings index e491aaf1..7a30f0d3 100644 --- a/LocalizedStringApp/LocalizedStringApp/en.lproj/three.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/three.strings @@ -8,3 +8,6 @@ "three1" = "three 1, localized english"; "three2" = "three 2, localized english"; + +"threeArg1" = "three 1 %@, localized english"; +"threeArg2" = "three 2 %@, localized english"; diff --git a/LocalizedStringApp/LocalizedStringApp/en.lproj/two.strings b/Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/two.strings similarity index 100% rename from LocalizedStringApp/LocalizedStringApp/en.lproj/two.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/en.lproj/two.strings diff --git a/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/five.strings b/Examples/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/five.strings similarity index 77% rename from LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/five.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/five.strings index a8527b0e..2c8b493d 100644 --- a/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/five.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/five.strings @@ -7,3 +7,7 @@ */ "five1" = "five 1, localized french canada"; + + + +"fiveArg1" = "five 1 %@, localized french canada"; diff --git a/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/six.strings b/Examples/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/six.strings similarity index 78% rename from LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/six.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/six.strings index 5d12bbb4..5c3e6b4b 100644 --- a/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/six.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/fr-CA.lproj/six.strings @@ -7,3 +7,5 @@ */ "six1" = "six 1, localized french canada"; + +"sixArg1" = "six 1 %@, localized french canada"; diff --git a/LocalizedStringApp/LocalizedStringApp/fr.lproj/eight.strings b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/eight.strings similarity index 69% rename from LocalizedStringApp/LocalizedStringApp/fr.lproj/eight.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/eight.strings index eb516b34..1806af6e 100644 --- a/LocalizedStringApp/LocalizedStringApp/fr.lproj/eight.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/eight.strings @@ -8,3 +8,7 @@ "eight1" = "eight 1, localized french"; "eight2" = "eight 2, localized french"; + + +"eightArg1" = "eight 1 %@, localized french"; +"eightArg2" = "eight 2 %@, localized french"; diff --git a/LocalizedStringApp/LocalizedStringApp/fr.lproj/five.strings b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/five.strings similarity index 65% rename from LocalizedStringApp/LocalizedStringApp/fr.lproj/five.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/five.strings index 510cff0d..d4aa4e5e 100644 --- a/LocalizedStringApp/LocalizedStringApp/fr.lproj/five.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/five.strings @@ -10,3 +10,7 @@ "five2" = "five 2, localized french"; "five4" = "five 4, localized french"; +"fiveArg1" = "five 1 %@, localized french"; +"fiveArg2" = "five 2 %@, localized french"; + +"fiveArg4" = "five 4 %@, localized french"; diff --git a/LocalizedStringApp/LocalizedStringApp/fr.lproj/nine.strings b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/nine.strings similarity index 70% rename from LocalizedStringApp/LocalizedStringApp/fr.lproj/nine.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/nine.strings index dfd502f9..0eb5eedc 100644 --- a/LocalizedStringApp/LocalizedStringApp/fr.lproj/nine.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/nine.strings @@ -8,3 +8,7 @@ "nine1" = "nine 1, localized french"; "nine2" = "nine 2, localized french"; + + +"nineArg1" = "nine 1 %@, localized french"; +"nineArg2" = "nine 2 %@, localized french"; diff --git a/LocalizedStringApp/LocalizedStringApp/fr.lproj/seven.strings b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/seven.strings similarity index 61% rename from LocalizedStringApp/LocalizedStringApp/fr.lproj/seven.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/seven.strings index 0b861449..103154fa 100644 --- a/LocalizedStringApp/LocalizedStringApp/fr.lproj/seven.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/seven.strings @@ -10,3 +10,7 @@ "seven2" = "seven 2, localized french"; "seven3" = "seven 3, localized french"; "seven4" = "seven 4, localized french"; +"sevenArg1" = "seven 1 %@, localized french"; +"sevenArg2" = "seven 2 %@, localized french"; +"sevenArg3" = "seven 3 %@, localized french"; +"sevenArg4" = "seven 4 %@, localized french"; diff --git a/LocalizedStringApp/LocalizedStringApp/fr.lproj/six.strings b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/six.strings similarity index 71% rename from LocalizedStringApp/LocalizedStringApp/fr.lproj/six.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/six.strings index 4662729a..4204e05f 100644 --- a/LocalizedStringApp/LocalizedStringApp/fr.lproj/six.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/six.strings @@ -8,3 +8,5 @@ "six1" = "six 1, localized french"; "six2" = "six 2, localized french"; +"sixArg1" = "six 1 %@, localized french"; +"sixArg2" = "six 2 %@, localized french"; diff --git a/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/ten.stringsdict b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/ten.stringsdict new file mode 100644 index 00000000..79cfd230 --- /dev/null +++ b/Examples/LocalizedStringApp/LocalizedStringApp/fr.lproj/ten.stringsdict @@ -0,0 +1,22 @@ + + + + + ten1 + + NSStringLocalizedFormatKey + ten 1 - %#@things@, localized french + things + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d thing + other + %d things + + + + diff --git a/LocalizedStringApp/LocalizedStringApp/nl.lproj/eight.strings b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/eight.strings similarity index 70% rename from LocalizedStringApp/LocalizedStringApp/nl.lproj/eight.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/eight.strings index e021e843..201254a5 100644 --- a/LocalizedStringApp/LocalizedStringApp/nl.lproj/eight.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/eight.strings @@ -10,3 +10,7 @@ "eight4" = "eight 4, localized dutch"; +"eightArg1" = "eight 1 %@, localized dutch"; + + +"eightArg4" = "eight 4 %@, localized dutch"; diff --git a/LocalizedStringApp/LocalizedStringApp/nl.lproj/four.strings b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/four.strings similarity index 81% rename from LocalizedStringApp/LocalizedStringApp/nl.lproj/four.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/four.strings index 107b1298..f5166b61 100644 --- a/LocalizedStringApp/LocalizedStringApp/nl.lproj/four.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/four.strings @@ -7,3 +7,4 @@ */ "four1" = "four 1, localized dutch"; +"fourArg" = "four %@, localized dutch"; diff --git a/LocalizedStringApp/LocalizedStringApp/nl.lproj/nine.strings b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/nine.strings similarity index 70% rename from LocalizedStringApp/LocalizedStringApp/nl.lproj/nine.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/nine.strings index 731f2415..1c90ba78 100644 --- a/LocalizedStringApp/LocalizedStringApp/nl.lproj/nine.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/nine.strings @@ -10,3 +10,7 @@ "nine4" = "nine 4, localized dutch"; +"nineArg1" = "nine 1 %@, localized dutch"; + + +"nineArg4" = "nine 4 %@, localized dutch"; diff --git a/LocalizedStringApp/LocalizedStringApp/nl.lproj/seven.strings b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/seven.strings similarity index 70% rename from LocalizedStringApp/LocalizedStringApp/nl.lproj/seven.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/seven.strings index dcc6ac44..330aae1d 100644 --- a/LocalizedStringApp/LocalizedStringApp/nl.lproj/seven.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/seven.strings @@ -10,3 +10,7 @@ "seven4" = "seven 4, localized dutch"; +"sevenArg1" = "seven 1 %@, localized dutch"; + + +"sevenArg4" = "seven 4 %@, localized dutch"; diff --git a/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/ten.stringsdict b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/ten.stringsdict new file mode 100644 index 00000000..cb2470e3 --- /dev/null +++ b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/ten.stringsdict @@ -0,0 +1,22 @@ + + + + + ten1 + + NSStringLocalizedFormatKey + ten 1 - %#@things@, localized dutch + things + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d thing + other + %d things + + + + diff --git a/LocalizedStringApp/LocalizedStringApp/nl.lproj/three.strings b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/three.strings similarity index 70% rename from LocalizedStringApp/LocalizedStringApp/nl.lproj/three.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/three.strings index 9ce1948e..886cdfcf 100644 --- a/LocalizedStringApp/LocalizedStringApp/nl.lproj/three.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/nl.lproj/three.strings @@ -9,3 +9,6 @@ "three1" = "three 1, localized dutch"; "three3" = "three 3, localized dutch"; +"threeArg1" = "three 1 %@, localized dutch"; + +"threeArg3" = "three 3 %@, localized dutch"; diff --git a/LocalizedStringApp/LocalizedStringApp/one.strings b/Examples/LocalizedStringApp/LocalizedStringApp/one.strings similarity index 84% rename from LocalizedStringApp/LocalizedStringApp/one.strings rename to Examples/LocalizedStringApp/LocalizedStringApp/one.strings index a7684a4f..8b41a199 100644 --- a/LocalizedStringApp/LocalizedStringApp/one.strings +++ b/Examples/LocalizedStringApp/LocalizedStringApp/one.strings @@ -8,3 +8,4 @@ "one1" = "one 1, not localized"; "one2" = "one 2, not localized"; +"oneArg" = "one %@, not localized"; diff --git a/LocalizedStringApp/LocalizedStringAppTests/Info.plist b/Examples/LocalizedStringApp/LocalizedStringAppTests/Info.plist similarity index 100% rename from LocalizedStringApp/LocalizedStringAppTests/Info.plist rename to Examples/LocalizedStringApp/LocalizedStringAppTests/Info.plist diff --git a/Examples/LocalizedStringApp/LocalizedStringAppTests/LocalizedStringAppTests.swift b/Examples/LocalizedStringApp/LocalizedStringAppTests/LocalizedStringAppTests.swift new file mode 100644 index 00000000..a180e156 --- /dev/null +++ b/Examples/LocalizedStringApp/LocalizedStringAppTests/LocalizedStringAppTests.swift @@ -0,0 +1,1019 @@ +// +// LocalizedStringAppTests.swift +// LocalizedStringAppTests +// +// Created by Tom Lokhorst on 2019-08-30. +// Copyright © 2019 R.swift. All rights reserved. +// + +import XCTest +@testable import LocalizedStringApp + +class LocalizedStringAppTests: XCTestCase { + + func testDefault() { + + /* one */ + XCTAssertEqual( + R.string.one.one1(), + NSLocalizedString("one1", tableName: "one", comment: "") + ) + XCTAssertEqual( + R.string.one.one2(), + NSLocalizedString("one2", tableName: "one", comment: "") + ) + XCTAssertEqual( + R.string.one.oneArg("ARG"), + String(format: NSLocalizedString("oneArg", tableName: "one", comment: ""), "ARG") + ) + + /* two */ + XCTAssertEqual( + R.string.two.two1(), + NSLocalizedString("two1", tableName: "two", comment: "") + ) + XCTAssertEqual( + R.string.two.two2("Hello"), + String(format: NSLocalizedString("two2", tableName: "two", comment: ""), locale: Locale.current, "Hello") + ) + + /* three */ + XCTAssertEqual( + R.string.three.three1(), + NSLocalizedString("three1", tableName: "three", comment: "") + ) + XCTAssertEqual( + R.string.three.three2(), + NSLocalizedString("three2", tableName: "three", comment: "") + ) + XCTAssertEqual( + R.string.three.three3(), + NSLocalizedString("three3", tableName: "three", comment: "") + ) + XCTAssertEqual( + R.string.three.threeArg1("ARG"), + String(format: NSLocalizedString("threeArg1", tableName: "three", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.three.threeArg2("ARG"), + String(format: NSLocalizedString("threeArg2", tableName: "three", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.three.threeArg3("ARG"), + String(format: NSLocalizedString("threeArg3", tableName: "three", comment: ""), "ARG") + ) + + /* four */ + XCTAssertEqual( + R.string.four.four1(), + NSLocalizedString("four1", tableName: "four", comment: "") + ) + XCTAssertEqual( + R.string.four.fourArg("ARG"), + String(format: NSLocalizedString("fourArg", tableName: "four", comment: ""), "ARG") + ) + + /* five */ + XCTAssertEqual( + R.string.five.five1(), + NSLocalizedString("five1", tableName: "five", comment: "") + ) + XCTAssertEqual( + R.string.five.five2(), + NSLocalizedString("five2", tableName: "five", value: "five 2, localized french", comment: "") + ) + XCTAssertEqual( + R.string.five.five4(), + NSLocalizedString("five4", tableName: "five", value: "five 4, localized french", comment: "") + ) + XCTAssertEqual( + R.string.five.fiveArg1("ARG"), + String(format: NSLocalizedString("fiveArg1", tableName: "five", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.five.fiveArg2("ARG"), + String(format: NSLocalizedString("fiveArg2", tableName: "five", value: "five 2 %@, localized french", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.five.fiveArg4("ARG"), + String(format: NSLocalizedString("fiveArg4", tableName: "five", value: "five 4 %@, localized french", comment: ""), "ARG") + ) + + /* six */ + XCTAssertEqual( + R.string.six.six1(), + NSLocalizedString("six1", tableName: "six", comment: "") + ) + XCTAssertEqual( + R.string.six.six2(), + NSLocalizedString("six2", tableName: "six", value: "six 2, localized french", comment: "") + ) + XCTAssertEqual( + R.string.six.sixArg1("ARG"), + String(format: NSLocalizedString("sixArg1", tableName: "six", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.six.sixArg2("ARG"), + String(format: NSLocalizedString("sixArg2", tableName: "six", value: "six 2 %@, localized french", comment: ""), "ARG") + ) + + /* seven */ + XCTAssertEqual( + R.string.seven.seven1(), + NSLocalizedString("seven1", tableName: "seven", comment: "") + ) + XCTAssertEqual( + R.string.seven.seven2(), + NSLocalizedString("seven2", tableName: "seven", value: "seven 2, localized french", comment: "") + ) + XCTAssertEqual( + R.string.seven.seven3(), + NSLocalizedString("seven3", tableName: "seven", value: "seven 3, localized french", comment: "") + ) + XCTAssertEqual( + R.string.seven.seven4(), + NSLocalizedString("seven4", tableName: "seven", value: "seven 4, localized french", comment: "") + ) + XCTAssertEqual( + R.string.seven.sevenArg1("ARG"), + String(format: NSLocalizedString("sevenArg1", tableName: "seven", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.seven.sevenArg2("ARG"), + String(format: NSLocalizedString("sevenArg2", tableName: "seven", value: "seven 2 %@, localized french", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.seven.sevenArg3("ARG"), + String(format: NSLocalizedString("sevenArg3", tableName: "seven", value: "seven 3 %@, localized french", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.seven.sevenArg4("ARG"), + String(format: NSLocalizedString("sevenArg4", tableName: "seven", value: "seven 4 %@, localized french", comment: ""), "ARG") + ) + + /* eight */ + XCTAssertEqual( + R.string.eight.eight1(), + NSLocalizedString("eight1", tableName: "eight", comment: "") + ) + XCTAssertEqual( + R.string.eight.eight2(), + NSLocalizedString("eight2", tableName: "eight", value: "eight 2, localized french", comment: "") + ) + XCTAssertEqual( + R.string.eight.eight3(), + NSLocalizedString("eight3", tableName: "eight", comment: "") + ) + XCTAssertEqual( + R.string.eight.eightArg1("ARG"), + String(format: NSLocalizedString("eightArg1", tableName: "eight", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.eight.eightArg2("ARG"), + String(format: NSLocalizedString("eightArg2", tableName: "eight", value: "eight 2 %@, localized french", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.eight.eightArg3("ARG"), + String(format: NSLocalizedString("eightArg3", tableName: "eight", comment: ""), "ARG") + ) + + /* nine */ + XCTAssertEqual( + R.string.nine.nine1(), + NSLocalizedString("nine1", tableName: "nine", comment: "") + ) + XCTAssertEqual( + R.string.nine.nine2(), + NSLocalizedString("nine2", tableName: "nine", value: "nine 2, localized french", comment: "") + ) + XCTAssertEqual( + R.string.nine.nine3(), + NSLocalizedString("nine3", tableName: "nine", comment: "") + ) + XCTAssertEqual( + R.string.nine.nineArg1("ARG"), + String(format: NSLocalizedString("nineArg1", tableName: "nine", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.nine.nineArg2("ARG"), + String(format: NSLocalizedString("nineArg2", tableName: "nine", value: "nine 2 %@, localized french", comment: ""), "ARG") + ) + XCTAssertEqual( + R.string.nine.nineArg3("ARG"), + String(format: NSLocalizedString("nineArg3", tableName: "nine", comment: ""), "ARG") + ) + + /* ten */ + XCTAssertEqual( + R.string.ten.ten1(things: 1), + String(format: NSLocalizedString("ten1", tableName: "ten", comment: ""), 1) + ) + } + + + func testTurkish() { + let myprefs = ["tr"] + + testPrefferedLanguages(myprefs: myprefs) + let strings = R.string(preferredLanguages: myprefs) + + /* one */ + XCTAssertEqual(strings.one.one1(), + "one 1, not localized") + XCTAssertEqual(strings.one.one2(), + "one 2, not localized") + XCTAssertEqual(strings.one.oneArg("ARG"), + "one ARG, not localized") + + /* two */ + XCTAssertEqual(strings.two.two1(), + "two1") + XCTAssertEqual(strings.two.two2("Hello"), + "two2") + + /* three */ + XCTAssertEqual(strings.three.three1(), + "three1") + XCTAssertEqual(strings.three.three2(), + "three2") + XCTAssertEqual(strings.three.three3(), + "three3") + XCTAssertEqual(strings.three.threeArg1("ARG"), + "threeArg1") + XCTAssertEqual(strings.three.threeArg2("ARG"), + "threeArg2") + XCTAssertEqual(strings.three.threeArg3("ARG"), + "threeArg3") + + /* four */ + XCTAssertEqual(strings.four.four1(), + "four1") + XCTAssertEqual(strings.four.fourArg("ARG"), + "fourArg") + + /* five */ + XCTAssertEqual(strings.five.five1(), + "five 1, localized french") + XCTAssertEqual(strings.five.five2(), + "five 2, localized french") + XCTAssertEqual(strings.five.five4(), + "five 4, localized french") + XCTAssertEqual(strings.five.fiveArg1("ARG"), + "five 1 ARG, localized french") + XCTAssertEqual(strings.five.fiveArg2("ARG"), + "five 2 ARG, localized french") + XCTAssertEqual(strings.five.fiveArg4("ARG"), + "five 4 ARG, localized french") + + /* six */ + XCTAssertEqual(strings.six.six1(), + "six 1, localized french") + XCTAssertEqual(strings.six.six2(), + "six 2, localized french") + XCTAssertEqual(strings.six.sixArg1("ARG"), + "six 1 ARG, localized french") + XCTAssertEqual(strings.six.sixArg2("ARG"), + "six 2 ARG, localized french") + + /* seven */ + XCTAssertEqual(strings.seven.seven1(), + "seven 1, localized french") + XCTAssertEqual(strings.seven.seven2(), + "seven 2, localized french") + XCTAssertEqual(strings.seven.seven3(), + "seven 3, localized french") + XCTAssertEqual(strings.seven.seven4(), + "seven 4, localized french") + XCTAssertEqual(strings.seven.sevenArg1("ARG"), + "seven 1 ARG, localized french") + XCTAssertEqual(strings.seven.sevenArg2("ARG"), + "seven 2 ARG, localized french") + XCTAssertEqual(strings.seven.sevenArg3("ARG"), + "seven 3 ARG, localized french") + XCTAssertEqual(strings.seven.sevenArg4("ARG"), + "seven 4 ARG, localized french") + + /* eight */ + XCTAssertEqual(strings.eight.eight1(), + "eight 1, localized french") + XCTAssertEqual(strings.eight.eight2(), + "eight 2, localized french") + XCTAssertEqual(strings.eight.eight3(), + "eight3") + XCTAssertEqual(strings.eight.eightArg1("ARG"), + "eight 1 ARG, localized french") + XCTAssertEqual(strings.eight.eightArg2("ARG"), + "eight 2 ARG, localized french") + XCTAssertEqual(strings.eight.eightArg3("ARG"), + "eightArg3") + + /* nine */ + XCTAssertEqual(strings.nine.nine1(), + "nine 1, localized french") + XCTAssertEqual(strings.nine.nine2(), + "nine 2, localized french") + XCTAssertEqual(strings.nine.nine3(), + "nine3") + XCTAssertEqual(strings.nine.nineArg1("ARG"), + "nine 1 ARG, localized french") + XCTAssertEqual(strings.nine.nineArg2("ARG"), + "nine 2 ARG, localized french") + XCTAssertEqual(strings.nine.nineArg3("ARG"), + "nineArg3") + + /* ten */ + XCTAssertEqual(strings.ten.ten1(things: 1), + "ten 1 - 1 thing, localized french") + } + + func testDutch() { + let myprefs = ["nl"] + + testPrefferedLanguages(myprefs: myprefs) + let strings = R.string(preferredLanguages: myprefs) + + /* one */ + XCTAssertEqual(strings.one.one1(), + "one 1, not localized") + XCTAssertEqual(strings.one.one2(), + "one 2, not localized") + XCTAssertEqual(strings.one.oneArg("ARG"), + "one ARG, not localized") + + /* two */ + XCTAssertEqual(strings.two.two1(), + "two1") + XCTAssertEqual(strings.two.two2("Hello"), + "two2") + + /* three */ + XCTAssertEqual(strings.three.three1(), + "three 1, localized dutch") + XCTAssertEqual(strings.three.three2(), + "three2") + XCTAssertEqual(strings.three.three3(), + "three 3, localized dutch") + XCTAssertEqual(strings.three.threeArg1("ARG"), + "three 1 ARG, localized dutch") + XCTAssertEqual(strings.three.threeArg2("ARG"), + "threeArg2") + XCTAssertEqual(strings.three.threeArg3("ARG"), + "three 3 ARG, localized dutch") + + /* four */ + XCTAssertEqual(strings.four.four1(), + "four 1, localized dutch") + XCTAssertEqual(strings.four.fourArg("ARG"), + "four ARG, localized dutch") + + /* five */ + XCTAssertEqual(strings.five.five1(), + "five 1, localized french") + XCTAssertEqual(strings.five.five2(), + "five 2, localized french") + XCTAssertEqual(strings.five.five4(), + "five 4, localized french") + XCTAssertEqual(strings.five.fiveArg1("ARG"), + "five 1 ARG, localized french") + XCTAssertEqual(strings.five.fiveArg2("ARG"), + "five 2 ARG, localized french") + XCTAssertEqual(strings.five.fiveArg4("ARG"), + "five 4 ARG, localized french") + + /* six */ + XCTAssertEqual(strings.six.six1(), + "six 1, localized french") + XCTAssertEqual(strings.six.six2(), + "six 2, localized french") + XCTAssertEqual(strings.six.sixArg1("ARG"), + "six 1 ARG, localized french") + XCTAssertEqual(strings.six.sixArg2("ARG"), + "six 2 ARG, localized french") + + /* seven */ + XCTAssertEqual(strings.seven.seven1(), + "seven 1, localized dutch") + XCTAssertEqual(strings.seven.seven2(), + "seven2") + XCTAssertEqual(strings.seven.seven3(), + "seven3") + XCTAssertEqual(strings.seven.seven4(), + "seven 4, localized dutch") + XCTAssertEqual(strings.seven.sevenArg1("ARG"), + "seven 1 ARG, localized dutch") + XCTAssertEqual(strings.seven.sevenArg2("ARG"), + "sevenArg2") + XCTAssertEqual(strings.seven.sevenArg3("ARG"), + "sevenArg3") + XCTAssertEqual(strings.seven.sevenArg4("ARG"), + "seven 4 ARG, localized dutch") + + /* eight */ + XCTAssertEqual(strings.eight.eight1(), + "eight 1, localized dutch") + XCTAssertEqual(strings.eight.eight2(), + "eight2") + XCTAssertEqual(strings.eight.eight3(), + "eight3") + XCTAssertEqual(strings.eight.eightArg1("ARG"), + "eight 1 ARG, localized dutch") + XCTAssertEqual(strings.eight.eightArg2("ARG"), + "eightArg2") + XCTAssertEqual(strings.eight.eightArg3("ARG"), + "eightArg3") + + /* nine */ + XCTAssertEqual(strings.nine.nine1(), + "nine 1, localized dutch") + XCTAssertEqual(strings.nine.nine2(), + "nine2") + XCTAssertEqual(strings.nine.nine3(), + "nine3") + XCTAssertEqual(strings.nine.nineArg1("ARG"), + "nine 1 ARG, localized dutch") + XCTAssertEqual(strings.nine.nineArg2("ARG"), + "nineArg2") + XCTAssertEqual(strings.nine.nineArg3("ARG"), + "nineArg3") + + /* ten */ + XCTAssertEqual(strings.ten.ten1(things: 1), + "ten 1 - 1 thing, localized dutch") + } + + func testEnglish() { + let myprefs = ["en"] + + testPrefferedLanguages(myprefs: myprefs) + let strings = R.string(preferredLanguages: myprefs) + + /* one */ + XCTAssertEqual(strings.one.one1(), + "one 1, not localized") + XCTAssertEqual(strings.one.one2(), + "one 2, not localized") + XCTAssertEqual(strings.one.oneArg("ARG"), + "one ARG, not localized") + + /* two */ + XCTAssertEqual(strings.two.two1(), + "two 1, localized english") + XCTAssertEqual(strings.two.two2("Hello"), + "two 2, Hello localized english") + + /* three */ + XCTAssertEqual(strings.three.three1(), + "three 1, localized english") + XCTAssertEqual(strings.three.three2(), + "three 2, localized english") + XCTAssertEqual(strings.three.three3(), + "three3") + XCTAssertEqual(strings.three.threeArg1("ARG"), + "three 1 ARG, localized english") + XCTAssertEqual(strings.three.threeArg2("ARG"), + "three 2 ARG, localized english") + XCTAssertEqual(strings.three.threeArg3("ARG"), + "threeArg3") + + /* four */ + XCTAssertEqual(strings.four.four1(), + "four1") + XCTAssertEqual(strings.four.fourArg("ARG"), + "fourArg") + + /* five */ + XCTAssertEqual(strings.five.five1(), + "five 1, localized english") + XCTAssertEqual(strings.five.five2(), + "five 2, localized english") + XCTAssertEqual(strings.five.five4(), + "five4") + XCTAssertEqual(strings.five.fiveArg1("ARG"), + "five 1 ARG, localized english") + XCTAssertEqual(strings.five.fiveArg2("ARG"), + "five 2 ARG, localized english") + XCTAssertEqual(strings.five.fiveArg4("ARG"), + "fiveArg4") + + /* six */ + XCTAssertEqual(strings.six.six1(), + "six 1, localized french") + XCTAssertEqual(strings.six.six2(), + "six 2, localized french") + XCTAssertEqual(strings.six.sixArg1("ARG"), + "six 1 ARG, localized french") + XCTAssertEqual(strings.six.sixArg2("ARG"), + "six 2 ARG, localized french") + + /* seven */ + XCTAssertEqual(strings.seven.seven1(), + "seven 1, localized english") + XCTAssertEqual(strings.seven.seven2(), + "seven 2, localized english") + XCTAssertEqual(strings.seven.seven3(), + "seven3") + XCTAssertEqual(strings.seven.seven4(), + "seven4") + XCTAssertEqual(strings.seven.sevenArg1("ARG"), + "seven 1 ARG, localized english") + XCTAssertEqual(strings.seven.sevenArg2("ARG"), + "seven 2 ARG, localized english") + XCTAssertEqual(strings.seven.sevenArg3("ARG"), + "sevenArg3") + XCTAssertEqual(strings.seven.sevenArg4("ARG"), + "sevenArg4") + + /* eight */ + XCTAssertEqual(strings.eight.eight1(), + "eight 1, localized base") + XCTAssertEqual(strings.eight.eight2(), + "eight 2, localized base") + XCTAssertEqual(strings.eight.eight3(), + "eight 3, localized base") + XCTAssertEqual(strings.eight.eightArg1("ARG"), + "eight 1 ARG, localized base") + XCTAssertEqual(strings.eight.eightArg2("ARG"), + "eight 2 ARG, localized base") + XCTAssertEqual(strings.eight.eightArg3("ARG"), + "eight 3 ARG, localized base") + + /* nine */ + XCTAssertEqual(strings.nine.nine1(), + "nine 1, localized english") + XCTAssertEqual(strings.nine.nine2(), + "nine 2, localized english") + XCTAssertEqual(strings.nine.nine3(), + "nine3") + XCTAssertEqual(strings.nine.nineArg1("ARG"), + "nine 1 ARG, localized english") + XCTAssertEqual(strings.nine.nineArg2("ARG"), + "nine 2 ARG, localized english") + XCTAssertEqual(strings.nine.nineArg3("ARG"), + "nineArg3") + + /* ten */ + XCTAssertEqual(strings.ten.ten1(things: 1), + "ten 1 - 1 thing, localized french") + } + + + func testEnglishGB() { + let myprefs = ["en-GB"] + + testPrefferedLanguages(myprefs: myprefs) + let strings = R.string(preferredLanguages: myprefs) + + /* one */ + XCTAssertEqual(strings.one.one1(), + "one 1, not localized") + XCTAssertEqual(strings.one.one2(), + "one 2, not localized") + XCTAssertEqual(strings.one.oneArg("ARG"), + "one ARG, not localized") + + /* two */ + XCTAssertEqual(strings.two.two1(), + "two 1, localized english") + XCTAssertEqual(strings.two.two2("Hello"), + "two 2, Hello localized english") + + /* three */ + XCTAssertEqual(strings.three.three1(), + "three 1, localized english") + XCTAssertEqual(strings.three.three2(), + "three 2, localized english") + XCTAssertEqual(strings.three.three3(), + "three3") + XCTAssertEqual(strings.three.threeArg1("ARG"), + "three 1 ARG, localized english") + XCTAssertEqual(strings.three.threeArg2("ARG"), + "three 2 ARG, localized english") + XCTAssertEqual(strings.three.threeArg3("ARG"), + "threeArg3") + + /* four */ + XCTAssertEqual(strings.four.four1(), + "four1") + XCTAssertEqual(strings.four.fourArg("ARG"), + "fourArg") + + /* five */ + XCTAssertEqual(strings.five.five1(), + "five 1, localized english gb") + XCTAssertEqual(strings.five.five2(), + "five2") + XCTAssertEqual(strings.five.five4(), + "five4") + XCTAssertEqual(strings.five.fiveArg1("ARG"), + "five 1 ARG, localized english gb") + XCTAssertEqual(strings.five.fiveArg2("ARG"), + "fiveArg2") + XCTAssertEqual(strings.five.fiveArg4("ARG"), + "fiveArg4") + + /* six */ + XCTAssertEqual(strings.six.six1(), + "six 1, localized french") + XCTAssertEqual(strings.six.six2(), + "six 2, localized french") + XCTAssertEqual(strings.six.sixArg1("ARG"), + "six 1 ARG, localized french") + XCTAssertEqual(strings.six.sixArg2("ARG"), + "six 2 ARG, localized french") + + /* seven */ + XCTAssertEqual(strings.seven.seven1(), + "seven 1, localized english") + XCTAssertEqual(strings.seven.seven2(), + "seven 2, localized english") + XCTAssertEqual(strings.seven.seven3(), + "seven3") + XCTAssertEqual(strings.seven.seven4(), + "seven4") + XCTAssertEqual(strings.seven.sevenArg1("ARG"), + "seven 1 ARG, localized english") + XCTAssertEqual(strings.seven.sevenArg2("ARG"), + "seven 2 ARG, localized english") + XCTAssertEqual(strings.seven.sevenArg3("ARG"), + "sevenArg3") + XCTAssertEqual(strings.seven.sevenArg4("ARG"), + "sevenArg4") + + /* eight */ + XCTAssertEqual(strings.eight.eight1(), + "eight 1, localized base") + XCTAssertEqual(strings.eight.eight2(), + "eight 2, localized base") + XCTAssertEqual(strings.eight.eight3(), + "eight 3, localized base") + XCTAssertEqual(strings.eight.eightArg1("ARG"), + "eight 1 ARG, localized base") + XCTAssertEqual(strings.eight.eightArg2("ARG"), + "eight 2 ARG, localized base") + XCTAssertEqual(strings.eight.eightArg3("ARG"), + "eight 3 ARG, localized base") + + /* nine */ + XCTAssertEqual(strings.nine.nine1(), + "nine 1, localized base") + XCTAssertEqual(strings.nine.nine2(), + "nine 2, localized base") + XCTAssertEqual(strings.nine.nine3(), + "nine 3, localized base") + XCTAssertEqual(strings.nine.nineArg1("ARG"), + "nine 1 ARG, localized base") + XCTAssertEqual(strings.nine.nineArg2("ARG"), + "nine 2 ARG, localized base") + XCTAssertEqual(strings.nine.nineArg3("ARG"), + "nine 3 ARG, localized base") + + /* ten */ + XCTAssertEqual(strings.ten.ten1(things: 1), + "ten 1 - 1 thing, localized french") + } + + + func testFrench() { + let myprefs = ["fr"] + + testPrefferedLanguages(myprefs: myprefs) + let strings = R.string(preferredLanguages: myprefs) + + /* one */ + XCTAssertEqual(strings.one.one1(), + "one 1, not localized") + XCTAssertEqual(strings.one.one2(), + "one 2, not localized") + XCTAssertEqual(strings.one.oneArg("ARG"), + "one ARG, not localized") + + /* two */ + XCTAssertEqual(strings.two.two1(), + "two1") + XCTAssertEqual(strings.two.two2("Hello"), + "two2") + + /* three */ + XCTAssertEqual(strings.three.three1(), + "three1") + XCTAssertEqual(strings.three.three2(), + "three2") + XCTAssertEqual(strings.three.three3(), + "three3") + XCTAssertEqual(strings.three.threeArg1("ARG"), + "threeArg1") + XCTAssertEqual(strings.three.threeArg2("ARG"), + "threeArg2") + XCTAssertEqual(strings.three.threeArg3("ARG"), + "threeArg3") + + /* four */ + XCTAssertEqual(strings.four.four1(), + "four1") + XCTAssertEqual(strings.four.fourArg("ARG"), + "fourArg") + + /* five */ + XCTAssertEqual(strings.five.five1(), + "five 1, localized french") + XCTAssertEqual(strings.five.five2(), + "five 2, localized french") + XCTAssertEqual(strings.five.five4(), + "five 4, localized french") + XCTAssertEqual(strings.five.fiveArg1("ARG"), + "five 1 ARG, localized french") + XCTAssertEqual(strings.five.fiveArg2("ARG"), + "five 2 ARG, localized french") + XCTAssertEqual(strings.five.fiveArg4("ARG"), + "five 4 ARG, localized french") + + /* six */ + XCTAssertEqual(strings.six.six1(), + "six 1, localized french") + XCTAssertEqual(strings.six.six2(), + "six 2, localized french") + XCTAssertEqual(strings.six.sixArg1("ARG"), + "six 1 ARG, localized french") + XCTAssertEqual(strings.six.sixArg2("ARG"), + "six 2 ARG, localized french") + + /* seven */ + XCTAssertEqual(strings.seven.seven1(), + "seven 1, localized french") + XCTAssertEqual(strings.seven.seven2(), + "seven 2, localized french") + XCTAssertEqual(strings.seven.seven3(), + "seven 3, localized french") + XCTAssertEqual(strings.seven.seven4(), + "seven 4, localized french") + XCTAssertEqual(strings.seven.sevenArg1("ARG"), + "seven 1 ARG, localized french") + XCTAssertEqual(strings.seven.sevenArg2("ARG"), + "seven 2 ARG, localized french") + XCTAssertEqual(strings.seven.sevenArg3("ARG"), + "seven 3 ARG, localized french") + XCTAssertEqual(strings.seven.sevenArg4("ARG"), + "seven 4 ARG, localized french") + + /* eight */ + XCTAssertEqual(strings.eight.eight1(), + "eight 1, localized french") + XCTAssertEqual(strings.eight.eight2(), + "eight 2, localized french") + XCTAssertEqual(strings.eight.eight3(), + "eight3") + XCTAssertEqual(strings.eight.eightArg1("ARG"), + "eight 1 ARG, localized french") + XCTAssertEqual(strings.eight.eightArg2("ARG"), + "eight 2 ARG, localized french") + XCTAssertEqual(strings.eight.eightArg3("ARG"), + "eightArg3") + + /* nine */ + XCTAssertEqual(strings.nine.nine1(), + "nine 1, localized french") + XCTAssertEqual(strings.nine.nine2(), + "nine 2, localized french") + XCTAssertEqual(strings.nine.nine3(), + "nine3") + XCTAssertEqual(strings.nine.nineArg1("ARG"), + "nine 1 ARG, localized french") + XCTAssertEqual(strings.nine.nineArg2("ARG"), + "nine 2 ARG, localized french") + XCTAssertEqual(strings.nine.nineArg3("ARG"), + "nineArg3") + + /* ten */ + XCTAssertEqual(strings.ten.ten1(things: 1), + "ten 1 - 1 thing, localized french") + } + + + func testFrenchCanada() { + let myprefs = ["fr-CA"] + + testPrefferedLanguages(myprefs: myprefs) + let strings = R.string(preferredLanguages: myprefs) + + /* one */ + XCTAssertEqual(strings.one.one1(), + "one 1, not localized") + XCTAssertEqual(strings.one.one2(), + "one 2, not localized") + XCTAssertEqual(strings.one.oneArg("ARG"), + "one ARG, not localized") + + /* two */ + XCTAssertEqual(strings.two.two1(), + "two1") + XCTAssertEqual(strings.two.two2("Hello"), + "two2") + + /* three */ + XCTAssertEqual(strings.three.three1(), + "three1") + XCTAssertEqual(strings.three.three2(), + "three2") + XCTAssertEqual(strings.three.three3(), + "three3") + XCTAssertEqual(strings.three.threeArg1("ARG"), + "threeArg1") + XCTAssertEqual(strings.three.threeArg2("ARG"), + "threeArg2") + XCTAssertEqual(strings.three.threeArg3("ARG"), + "threeArg3") + + /* four */ + XCTAssertEqual(strings.four.four1(), + "four1") + XCTAssertEqual(strings.four.fourArg("ARG"), + "fourArg") + + /* five */ + XCTAssertEqual(strings.five.five1(), + "five 1, localized french canada") + XCTAssertEqual(strings.five.five2(), + "five2") + XCTAssertEqual(strings.five.five4(), + "five4") + XCTAssertEqual(strings.five.fiveArg1("ARG"), + "five 1 ARG, localized french canada") + XCTAssertEqual(strings.five.fiveArg2("ARG"), + "fiveArg2") + XCTAssertEqual(strings.five.fiveArg4("ARG"), + "fiveArg4") + + /* six */ + XCTAssertEqual(strings.six.six1(), + "six 1, localized french canada") + XCTAssertEqual(strings.six.six2(), + "six2") + XCTAssertEqual(strings.six.sixArg1("ARG"), + "six 1 ARG, localized french canada") + XCTAssertEqual(strings.six.sixArg2("ARG"), + "sixArg2") + + /* seven */ + XCTAssertEqual(strings.seven.seven1(), + "seven 1, localized french") + XCTAssertEqual(strings.seven.seven2(), + "seven 2, localized french") + XCTAssertEqual(strings.seven.seven3(), + "seven 3, localized french") + XCTAssertEqual(strings.seven.seven4(), + "seven 4, localized french") + XCTAssertEqual(strings.seven.sevenArg1("ARG"), + "seven 1 ARG, localized french") + XCTAssertEqual(strings.seven.sevenArg2("ARG"), + "seven 2 ARG, localized french") + XCTAssertEqual(strings.seven.sevenArg3("ARG"), + "seven 3 ARG, localized french") + XCTAssertEqual(strings.seven.sevenArg4("ARG"), + "seven 4 ARG, localized french") + + /* eight */ + XCTAssertEqual(strings.eight.eight1(), + "eight 1, localized base") + XCTAssertEqual(strings.eight.eight2(), + "eight 2, localized base") + XCTAssertEqual(strings.eight.eight3(), + "eight 3, localized base") + XCTAssertEqual(strings.eight.eightArg1("ARG"), + "eight 1 ARG, localized base") + XCTAssertEqual(strings.eight.eightArg2("ARG"), + "eight 2 ARG, localized base") + XCTAssertEqual(strings.eight.eightArg3("ARG"), + "eight 3 ARG, localized base") + + /* nine */ + XCTAssertEqual(strings.nine.nine1(), + "nine 1, localized base") + XCTAssertEqual(strings.nine.nine2(), + "nine 2, localized base") + XCTAssertEqual(strings.nine.nine3(), + "nine 3, localized base") + XCTAssertEqual(strings.nine.nineArg1("ARG"), + "nine 1 ARG, localized base") + XCTAssertEqual(strings.nine.nineArg2("ARG"), + "nine 2 ARG, localized base") + XCTAssertEqual(strings.nine.nineArg3("ARG"), + "nine 3 ARG, localized base") + + /* ten */ + XCTAssertEqual(strings.ten.ten1(things: 1), + "ten 1 - 1 thing, localized french") + } + + + func testPrefferedLanguages(myprefs: [String]) { + + /* one */ + XCTAssertEqual(R.string.one.one1(preferredLanguages: myprefs), + R.string.one(preferredLanguages: myprefs).one1()) + XCTAssertEqual(R.string.one.one2(preferredLanguages: myprefs), + R.string.one(preferredLanguages: myprefs).one2()) + XCTAssertEqual(R.string.one.oneArg("ARG", preferredLanguages: myprefs), + R.string.one(preferredLanguages: myprefs).oneArg("ARG")) + + /* two */ + XCTAssertEqual(R.string.two.two1(preferredLanguages: myprefs), + R.string.two(preferredLanguages: myprefs).two1()) + XCTAssertEqual(R.string.two.two2("Hello", preferredLanguages: myprefs), + R.string.two(preferredLanguages: myprefs).two2("Hello")) + + /* three */ + XCTAssertEqual(R.string.three.three1(preferredLanguages: myprefs), + R.string.three(preferredLanguages: myprefs).three1()) + XCTAssertEqual(R.string.three.three2(preferredLanguages: myprefs), + R.string.three(preferredLanguages: myprefs).three2()) + XCTAssertEqual(R.string.three.three3(preferredLanguages: myprefs), + R.string.three(preferredLanguages: myprefs).three3()) + XCTAssertEqual(R.string.three.threeArg1("ARG", preferredLanguages: myprefs), + R.string.three(preferredLanguages: myprefs).threeArg1("ARG")) + XCTAssertEqual(R.string.three.threeArg2("ARG", preferredLanguages: myprefs), + R.string.three(preferredLanguages: myprefs).threeArg2("ARG")) + XCTAssertEqual(R.string.three.threeArg3("ARG", preferredLanguages: myprefs), + R.string.three(preferredLanguages: myprefs).threeArg3("ARG")) + + /* four */ + XCTAssertEqual(R.string.four.four1(preferredLanguages: myprefs), + R.string.four(preferredLanguages: myprefs).four1()) + XCTAssertEqual(R.string.four.fourArg("ARG", preferredLanguages: myprefs), + R.string.four(preferredLanguages: myprefs).fourArg("ARG")) + + /* five */ + XCTAssertEqual(R.string.five.five1(preferredLanguages: myprefs), + R.string.five(preferredLanguages: myprefs).five1()) + XCTAssertEqual(R.string.five.five2(preferredLanguages: myprefs), + R.string.five(preferredLanguages: myprefs).five2()) + XCTAssertEqual(R.string.five.five4(preferredLanguages: myprefs), + R.string.five(preferredLanguages: myprefs).five4()) + XCTAssertEqual(R.string.five.fiveArg1("ARG", preferredLanguages: myprefs), + R.string.five(preferredLanguages: myprefs).fiveArg1("ARG")) + XCTAssertEqual(R.string.five.fiveArg2("ARG", preferredLanguages: myprefs), + R.string.five(preferredLanguages: myprefs).fiveArg2("ARG")) + XCTAssertEqual(R.string.five.fiveArg4("ARG", preferredLanguages: myprefs), + R.string.five(preferredLanguages: myprefs).fiveArg4("ARG")) + + /* six */ + XCTAssertEqual(R.string.six.six1(preferredLanguages: myprefs), + R.string.six(preferredLanguages: myprefs).six1()) + XCTAssertEqual(R.string.six.six2(preferredLanguages: myprefs), + R.string.six(preferredLanguages: myprefs).six2()) + XCTAssertEqual(R.string.six.sixArg1("ARG", preferredLanguages: myprefs), + R.string.six(preferredLanguages: myprefs).sixArg1("ARG")) + XCTAssertEqual(R.string.six.sixArg2("ARG", preferredLanguages: myprefs), + R.string.six(preferredLanguages: myprefs).sixArg2("ARG")) + + /* seven */ + XCTAssertEqual(R.string.seven.seven1(preferredLanguages: myprefs), + R.string.seven(preferredLanguages: myprefs).seven1()) + XCTAssertEqual(R.string.seven.seven2(preferredLanguages: myprefs), + R.string.seven(preferredLanguages: myprefs).seven2()) + XCTAssertEqual(R.string.seven.seven3(preferredLanguages: myprefs), + R.string.seven(preferredLanguages: myprefs).seven3()) + XCTAssertEqual(R.string.seven.seven4(preferredLanguages: myprefs), + R.string.seven(preferredLanguages: myprefs).seven4()) + XCTAssertEqual(R.string.seven.sevenArg1("ARG", preferredLanguages: myprefs), + R.string.seven(preferredLanguages: myprefs).sevenArg1("ARG")) + XCTAssertEqual(R.string.seven.sevenArg2("ARG", preferredLanguages: myprefs), + R.string.seven(preferredLanguages: myprefs).sevenArg2("ARG")) + XCTAssertEqual(R.string.seven.sevenArg3("ARG", preferredLanguages: myprefs), + R.string.seven(preferredLanguages: myprefs).sevenArg3("ARG")) + XCTAssertEqual(R.string.seven.sevenArg4("ARG", preferredLanguages: myprefs), + R.string.seven(preferredLanguages: myprefs).sevenArg4("ARG")) + + /* eight */ + XCTAssertEqual(R.string.eight.eight1(preferredLanguages: myprefs), + R.string.eight(preferredLanguages: myprefs).eight1()) + XCTAssertEqual(R.string.eight.eight2(preferredLanguages: myprefs), + R.string.eight(preferredLanguages: myprefs).eight2()) + XCTAssertEqual(R.string.eight.eight3(preferredLanguages: myprefs), + R.string.eight(preferredLanguages: myprefs).eight3()) + XCTAssertEqual(R.string.eight.eightArg1("ARG", preferredLanguages: myprefs), + R.string.eight(preferredLanguages: myprefs).eightArg1("ARG")) + XCTAssertEqual(R.string.eight.eightArg2("ARG", preferredLanguages: myprefs), + R.string.eight(preferredLanguages: myprefs).eightArg2("ARG")) + XCTAssertEqual(R.string.eight.eightArg3("ARG", preferredLanguages: myprefs), + R.string.eight(preferredLanguages: myprefs).eightArg3("ARG")) + + /* nine */ + XCTAssertEqual(R.string.nine.nine1(preferredLanguages: myprefs), + R.string.nine(preferredLanguages: myprefs).nine1()) + XCTAssertEqual(R.string.nine.nine2(preferredLanguages: myprefs), + R.string.nine(preferredLanguages: myprefs).nine2()) + XCTAssertEqual(R.string.nine.nine3(preferredLanguages: myprefs), + R.string.nine(preferredLanguages: myprefs).nine3()) + XCTAssertEqual(R.string.nine.nineArg1("ARG", preferredLanguages: myprefs), + R.string.nine(preferredLanguages: myprefs).nineArg1("ARG")) + XCTAssertEqual(R.string.nine.nineArg2("ARG", preferredLanguages: myprefs), + R.string.nine(preferredLanguages: myprefs).nineArg2("ARG")) + XCTAssertEqual(R.string.nine.nineArg3("ARG", preferredLanguages: myprefs), + R.string.nine(preferredLanguages: myprefs).nineArg3("ARG")) + + /* ten */ + XCTAssertEqual(R.string.ten.ten1(things: 1, preferredLanguages: myprefs), + R.string.ten(preferredLanguages: myprefs).ten1(things: 1)) + } + +} diff --git a/Examples/Podfile b/Examples/Podfile deleted file mode 100644 index 77c965e1..00000000 --- a/Examples/Podfile +++ /dev/null @@ -1,50 +0,0 @@ -use_frameworks! -workspace 'RswiftExamples' - -def rswiftlib - pod 'R.swift.Library', :git => 'https://github.com/mac-cain13/R.swift.Library.git' # for CI builds -# pod 'R.swift.Library', :path => '../../R.swift.Library' # for development -end - -target 'ResourceApp' do - platform :ios, '9.0' - project 'ResourceApp/ResourceApp' - - pod 'SWRevealViewController' - - rswiftlib -end - -target 'ResourceAppTests' do - platform :ios, '9.0' - project 'ResourceApp/ResourceApp' - - pod 'SWRevealViewController' - - rswiftlib -end - -target 'ResourceApp-watchOS-Extension' do - platform :watchos, '2.2' - project 'RwatchApp/RwatchApp' - - rswiftlib -end - -target 'App' do - platform :ios, '9.0' - project 'RswiftAppWithStaticFrameworks/RswiftAppWithStaticFrameworks' - rswiftlib -end - -target 'Foo' do - platform :ios, '9.0' - project 'RswiftAppWithStaticFrameworks/RswiftAppWithStaticFrameworks' - rswiftlib -end - -target 'Bar' do - platform :ios, '9.0' - project 'RswiftAppWithStaticFrameworks/RswiftAppWithStaticFrameworks' - rswiftlib -end diff --git a/Examples/Podfile.lock b/Examples/Podfile.lock deleted file mode 100644 index 8551664d..00000000 --- a/Examples/Podfile.lock +++ /dev/null @@ -1,28 +0,0 @@ -PODS: - - R.swift.Library (5.2.0) - - SWRevealViewController (2.3.0) - -DEPENDENCIES: - - R.swift.Library (from `https://github.com/mac-cain13/R.swift.Library.git`) - - SWRevealViewController - -SPEC REPOS: - trunk: - - SWRevealViewController - -EXTERNAL SOURCES: - R.swift.Library: - :git: https://github.com/mac-cain13/R.swift.Library.git - -CHECKOUT OPTIONS: - R.swift.Library: - :commit: 5a54805e3d08077e46edb2274ff27b20b700f568 - :git: https://github.com/mac-cain13/R.swift.Library.git - -SPEC CHECKSUMS: - R.swift.Library: 5ba4f1631300caf9a4d890186930da85d540769d - SWRevealViewController: 6d3fd97f70112fd7cef9de14df4260eacce4c63a - -PODFILE CHECKSUM: d9a891a898cc2f561fdd4b8424cb30a1e14741d9 - -COCOAPODS: 1.11.2 diff --git a/Examples/ResourceApp/Podfile b/Examples/ResourceApp/Podfile new file mode 100644 index 00000000..81460b43 --- /dev/null +++ b/Examples/ResourceApp/Podfile @@ -0,0 +1,17 @@ +use_frameworks! +workspace 'ResourceApp' + +target 'ResourceApp' do + platform :ios, '12.0' + project 'ResourceApp' + + pod 'SWRevealViewController' +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' + end + end +end diff --git a/Examples/ResourceApp/Podfile.lock b/Examples/ResourceApp/Podfile.lock new file mode 100644 index 00000000..817f7e47 --- /dev/null +++ b/Examples/ResourceApp/Podfile.lock @@ -0,0 +1,16 @@ +PODS: + - SWRevealViewController (2.3.0) + +DEPENDENCIES: + - SWRevealViewController + +SPEC REPOS: + trunk: + - SWRevealViewController + +SPEC CHECKSUMS: + SWRevealViewController: 6d3fd97f70112fd7cef9de14df4260eacce4c63a + +PODFILE CHECKSUM: e2c390a1550dbee3d41134bbc3a65772c599b62c + +COCOAPODS: 1.16.2 diff --git a/Examples/ResourceApp/ResourceApp.xcodeproj/project.pbxproj b/Examples/ResourceApp/ResourceApp.xcodeproj/project.pbxproj index f1b4202f..585ac7f3 100644 --- a/Examples/ResourceApp/ResourceApp.xcodeproj/project.pbxproj +++ b/Examples/ResourceApp/ResourceApp.xcodeproj/project.pbxproj @@ -82,10 +82,10 @@ E296935A1CAD64D100401D53 /* associatedtype in Resources */ = {isa = PBXBuildFile; fileRef = E29693591CAD64D100401D53 /* associatedtype */; }; E296935C1CAD666200401D53 /* #column in Resources */ = {isa = PBXBuildFile; fileRef = E296935B1CAD666200401D53 /* #column */; }; E2A10EF81CD13779006BFC63 /* RelativeToProject.xib in Resources */ = {isa = PBXBuildFile; fileRef = E2A10EF71CD13779006BFC63 /* RelativeToProject.xib */; }; + E2C415D028EED7890028D537 /* RswiftLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = E2C415CF28EED7890028D537 /* RswiftLibrary */; }; E2CD68671D7CADEA00BEBE59 /* hello.txt in Resources */ = {isa = PBXBuildFile; fileRef = E2CD68641D7CACC100BEBE59 /* hello.txt */; }; E2DB0EB02334DCC100815AAF /* InfoPlistTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2DB0EAF2334DCC100815AAF /* InfoPlistTests.swift */; }; E2F768FC244D92A200761E14 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2F768FB244D92A200761E14 /* SceneDelegate.swift */; }; - E9AC5C6AD09E1F44053BD761 /* Pods_ResourceAppTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8FBDF096D9D6AD6FDFA06C34 /* Pods_ResourceAppTests.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -127,25 +127,16 @@ /* Begin PBXFileReference section */ 1867ABA7936CAD2320B248E1 /* Pods_ResourceApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ResourceApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 22ACD120062243785169391F /* Pods-Shared-ResourceApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Shared-ResourceApp.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-Shared-ResourceApp/Pods-Shared-ResourceApp.debug.xcconfig"; sourceTree = ""; }; - 3677277BC1C4F3F77310381B /* Pods-Shared-ResourceApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Shared-ResourceApp.release.xcconfig"; path = "../Pods/Target Support Files/Pods-Shared-ResourceApp/Pods-Shared-ResourceApp.release.xcconfig"; sourceTree = ""; }; - 3B3FAD8309D5672ABACA9274 /* Pods-ResourceAppTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ResourceAppTests.release.xcconfig"; path = "../Pods/Target Support Files/Pods-ResourceAppTests/Pods-ResourceAppTests.release.xcconfig"; sourceTree = ""; }; - 41D4DA51D96C4F7DDF13157E /* Pods-ResourceApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ResourceApp.release.xcconfig"; path = "../Pods/Target Support Files/Pods-ResourceApp/Pods-ResourceApp.release.xcconfig"; sourceTree = ""; }; + 41D4DA51D96C4F7DDF13157E /* Pods-ResourceApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ResourceApp.release.xcconfig"; path = "Pods/Target Support Files/Pods-ResourceApp/Pods-ResourceApp.release.xcconfig"; sourceTree = ""; }; 5D1AFAB01C858637003FE7AB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 5D1AFAB21C858647003FE7AB /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = ""; }; 5D1AFAB31C85864F003FE7AB /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; 5D9E41331C96918E002172D3 /* StringsTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringsTests.swift; sourceTree = ""; }; - 70B4C9EF7848D510D018EB8E /* Pods-Shared-ResourceApp-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Shared-ResourceApp-tvOS.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-Shared-ResourceApp-tvOS/Pods-Shared-ResourceApp-tvOS.debug.xcconfig"; sourceTree = ""; }; - 834EBD01FDB33C84073DF3C0 /* Pods-ResourceAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ResourceAppTests.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-ResourceAppTests/Pods-ResourceAppTests.debug.xcconfig"; sourceTree = ""; }; - 8FBDF096D9D6AD6FDFA06C34 /* Pods_ResourceAppTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ResourceAppTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 9C2D4D874D7A6B1F02578293 /* Pods-Shared-ResourceAppTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Shared-ResourceAppTests.release.xcconfig"; path = "../Pods/Target Support Files/Pods-Shared-ResourceAppTests/Pods-Shared-ResourceAppTests.release.xcconfig"; sourceTree = ""; }; A3D0897320CF6FDA007ED462 /* Keep.dont.ignoreme.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Keep.dont.ignoreme.png; sourceTree = ""; }; A3D0897520CF6FE4007ED462 /* ExplicitInclude.ignoreme.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ExplicitInclude.ignoreme.png; sourceTree = ""; }; - BCFE901EE74D3A3CF9909E5D /* Pods-ResourceApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ResourceApp.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-ResourceApp/Pods-ResourceApp.debug.xcconfig"; sourceTree = ""; }; + BCFE901EE74D3A3CF9909E5D /* Pods-ResourceApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ResourceApp.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ResourceApp/Pods-ResourceApp.debug.xcconfig"; sourceTree = ""; }; C378DD791C68C2BF003598B8 /* SupplementaryElement.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SupplementaryElement.xib; sourceTree = ""; }; CCBC9CB81EC4809D002F3D0E /* Images2.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images2.xcassets; sourceTree = ""; }; - D41BDD927A1804A5D763C750 /* Pods-Shared-ResourceApp-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Shared-ResourceApp-tvOS.release.xcconfig"; path = "../Pods/Target Support Files/Pods-Shared-ResourceApp-tvOS/Pods-Shared-ResourceApp-tvOS.release.xcconfig"; sourceTree = ""; }; - D436146321CC7322E5ECEE24 /* Pods-Shared-ResourceAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Shared-ResourceAppTests.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-Shared-ResourceAppTests/Pods-Shared-ResourceAppTests.debug.xcconfig"; sourceTree = ""; }; D50175BA1B5FEF6E00DB8314 /* rswift.log */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rswift.log; sourceTree = SOURCE_ROOT; }; D50175BD1B5FEFD000DB8314 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Secondary.storyboard; sourceTree = ""; }; D5159E9D1BBC33680013F52A /* Colors@2x.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "Colors@2x.jpg"; sourceTree = ""; }; @@ -221,6 +212,7 @@ E29693591CAD64D100401D53 /* associatedtype */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = associatedtype; sourceTree = ""; }; E296935B1CAD666200401D53 /* #column */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "#column"; sourceTree = ""; }; E2A10EF71CD13779006BFC63 /* RelativeToProject.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RelativeToProject.xib; sourceTree = ""; }; + E2C415CE28EED7580028D537 /* R.swift */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = R.swift; path = ../..; sourceTree = ""; }; E2CD68631D7CACC100BEBE59 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text; name = Base; path = Base.lproj/hello.txt; sourceTree = ""; }; E2CD68651D7CACCA00BEBE59 /* es */ = {isa = PBXFileReference; lastKnownFileType = text; name = es; path = es.lproj/hello.txt; sourceTree = ""; }; E2CD68661D7CACCB00BEBE59 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text; name = nl; path = nl.lproj/hello.txt; sourceTree = ""; }; @@ -234,6 +226,7 @@ buildActionMask = 2147483647; files = ( C30DF7218982DFFDAFAD2A11 /* Pods_ResourceApp.framework in Frameworks */, + E2C415D028EED7890028D537 /* RswiftLibrary in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -241,7 +234,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - E9AC5C6AD09E1F44053BD761 /* Pods_ResourceAppTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -253,7 +245,6 @@ children = ( D5B799881C1B8F0C009EA901 /* AVKit.framework */, 1867ABA7936CAD2320B248E1 /* Pods_ResourceApp.framework */, - 8FBDF096D9D6AD6FDFA06C34 /* Pods_ResourceAppTests.framework */, ); name = Frameworks; sourceTree = ""; @@ -276,16 +267,8 @@ 6BD8864A6B6559C4D6F93D81 /* Pods */ = { isa = PBXGroup; children = ( - 22ACD120062243785169391F /* Pods-Shared-ResourceApp.debug.xcconfig */, - 3677277BC1C4F3F77310381B /* Pods-Shared-ResourceApp.release.xcconfig */, - 70B4C9EF7848D510D018EB8E /* Pods-Shared-ResourceApp-tvOS.debug.xcconfig */, - D41BDD927A1804A5D763C750 /* Pods-Shared-ResourceApp-tvOS.release.xcconfig */, - D436146321CC7322E5ECEE24 /* Pods-Shared-ResourceAppTests.debug.xcconfig */, - 9C2D4D874D7A6B1F02578293 /* Pods-Shared-ResourceAppTests.release.xcconfig */, BCFE901EE74D3A3CF9909E5D /* Pods-ResourceApp.debug.xcconfig */, 41D4DA51D96C4F7DDF13157E /* Pods-ResourceApp.release.xcconfig */, - 834EBD01FDB33C84073DF3C0 /* Pods-ResourceAppTests.debug.xcconfig */, - 3B3FAD8309D5672ABACA9274 /* Pods-ResourceAppTests.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -311,6 +294,7 @@ D55C6CAF1B5D757300301B0D = { isa = PBXGroup; children = ( + E2C415CD28EED7580028D537 /* Packages */, E243EFA32510DFA600DC653F /* RswiftUI.xcodeproj */, D5DE480D1B5E1CC7000F6A85 /* R.generated.swift */, D5EE1B5722DEEFBF00A901EC /* R.UITest.generated.swift */, @@ -457,6 +441,14 @@ path = "ResourceApp/Relative To Project"; sourceTree = SOURCE_ROOT; }; + E2C415CD28EED7580028D537 /* Packages */ = { + isa = PBXGroup; + children = ( + E2C415CE28EED7580028D537 /* R.swift */, + ); + name = Packages; + sourceTree = ""; + }; E2CD68611D7CAC9200BEBE59 /* Localized */ = { isa = PBXGroup; children = ( @@ -485,6 +477,9 @@ dependencies = ( ); name = ResourceApp; + packageProductDependencies = ( + E2C415CF28EED7890028D537 /* RswiftLibrary */, + ); productName = ResourceApp; productReference = D55C6CB81B5D757300301B0D /* ResourceApp.app */; productType = "com.apple.product-type.application"; @@ -493,11 +488,9 @@ isa = PBXNativeTarget; buildConfigurationList = D55C6CDC1B5D757300301B0D /* Build configuration list for PBXNativeTarget "ResourceAppTests" */; buildPhases = ( - ED8FCF67313DC003391627B7 /* [CP] Check Pods Manifest.lock */, D55C6CCB1B5D757300301B0D /* Sources */, D55C6CCC1B5D757300301B0D /* Frameworks */, D55C6CCD1B5D757300301B0D /* Resources */, - 45EF1C0CF8F1496731872E16 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -515,9 +508,14 @@ D55C6CB01B5D757300301B0D /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; + KnownAssetTags = ( + one, + two, + ); LastSwiftMigration = 0700; LastSwiftUpdateCheck = 1000; - LastUpgradeCheck = 1210; + LastUpgradeCheck = 1500; ORGANIZATIONNAME = "Mathijs Kadijk"; TargetAttributes = { D55C6CB71B5D757300301B0D = { @@ -655,26 +653,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 45EF1C0CF8F1496731872E16 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ResourceAppTests/Pods-ResourceAppTests-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/R.swift.Library-iOS/Rswift.framework", - "${BUILT_PRODUCTS_DIR}/SWRevealViewController/SWRevealViewController.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Rswift.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SWRevealViewController.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ResourceAppTests/Pods-ResourceAppTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; 89BF8D4EC08D38DB6564C369 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -682,12 +660,10 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-ResourceApp/Pods-ResourceApp-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/R.swift.Library-iOS/Rswift.framework", "${BUILT_PRODUCTS_DIR}/SWRevealViewController/SWRevealViewController.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Rswift.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SWRevealViewController.framework", ); runOnlyForDeploymentPostprocessing = 0; @@ -723,29 +699,12 @@ ); name = R.swift; outputPaths = ( - "$(SRCROOT)/R.generated.swift", - "$(SRCROOT)/R.UITest.generated.swift", + $SRCROOT/R.generated.swift, + $SRCROOT/R.UITest.generated.swift, ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"$SRCROOT/../../build/Debug/rswift\" generate --generateUITestFile \"$SRCROOT/R.UITest.generated.swift\" --import SWRevealViewController \"$SRCROOT/R.generated.swift\" > \"$SRCROOT/rswift.log\"\n"; - }; - ED8FCF67313DC003391627B7 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-ResourceAppTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "../../.build/release/rswift generate --import SWRevealViewController \"$SRCROOT/R.generated.swift\" > \"$SRCROOT/rswift.log\"\n../../.build/release/rswift generate \"$SRCROOT/R.UITest.generated.swift\" --generators id\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -892,6 +851,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -907,14 +867,14 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; - TVOS_DEPLOYMENT_TARGET = 9.0; + TVOS_DEPLOYMENT_TARGET = 12.0; }; name = Debug; }; @@ -952,6 +912,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -960,12 +921,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; - TVOS_DEPLOYMENT_TARGET = 9.0; + TVOS_DEPLOYMENT_TARGET = 12.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -977,7 +938,6 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = ResourceApp/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -995,7 +955,6 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = ResourceApp/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1010,7 +969,6 @@ }; D55C6CDD1B5D757300301B0D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 834EBD01FDB33C84073DF3C0 /* Pods-ResourceAppTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; @@ -1033,7 +991,6 @@ }; D55C6CDE1B5D757300301B0D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3B3FAD8309D5672ABACA9274 /* Pods-ResourceAppTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; @@ -1083,6 +1040,13 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCSwiftPackageProductDependency section */ + E2C415CF28EED7890028D537 /* RswiftLibrary */ = { + isa = XCSwiftPackageProductDependency; + productName = RswiftLibrary; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = D55C6CB01B5D757300301B0D /* Project object */; } diff --git a/Examples/ResourceApp/ResourceApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Examples/ResourceApp/ResourceApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 00000000..284750e1 --- /dev/null +++ b/Examples/ResourceApp/ResourceApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,23 @@ +{ + "pins" : [ + { + "identity" : "swift-argument-parser", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-argument-parser", + "state" : { + "revision" : "fddd1c00396eed152c45a46bea9f47b98e59301d", + "version" : "1.2.0" + } + }, + { + "identity" : "xcodeedit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/tomlokhorst/XcodeEdit", + "state" : { + "revision" : "cd466d6e8c5ffd2f2b61165d37b0646f09068e1e", + "version" : "2.9.0" + } + } + ], + "version" : 2 +} diff --git a/Examples/ResourceApp/ResourceApp.xcodeproj/xcshareddata/xcschemes/ResourceApp.xcscheme b/Examples/ResourceApp/ResourceApp.xcodeproj/xcshareddata/xcschemes/ResourceApp.xcscheme index 64995ebf..51606752 100644 --- a/Examples/ResourceApp/ResourceApp.xcodeproj/xcshareddata/xcschemes/ResourceApp.xcscheme +++ b/Examples/ResourceApp/ResourceApp.xcodeproj/xcshareddata/xcschemes/ResourceApp.xcscheme @@ -1,6 +1,6 @@ + location = "group:ResourceApp.xcodeproj"> diff --git a/LocalizedStringApp/LocalizedStringApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Examples/ResourceApp/ResourceApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from LocalizedStringApp/LocalizedStringApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Examples/ResourceApp/ResourceApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Examples/ResourceApp/ResourceApp.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Examples/ResourceApp/ResourceApp.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 00000000..bd62cf45 --- /dev/null +++ b/Examples/ResourceApp/ResourceApp.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,23 @@ +{ + "pins" : [ + { + "identity" : "swift-argument-parser", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-argument-parser", + "state" : { + "revision" : "fddd1c00396eed152c45a46bea9f47b98e59301d", + "version" : "1.2.0" + } + }, + { + "identity" : "xcodeedit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/tomlokhorst/XcodeEdit", + "state" : { + "revision" : "1e761a55dd8d73b4e9cc227a297f438413953571", + "version" : "2.11.1" + } + } + ], + "version" : 2 +} diff --git a/Examples/ResourceApp/ResourceApp/Base.lproj/Main.storyboard b/Examples/ResourceApp/ResourceApp/Base.lproj/Main.storyboard index 304eb384..c84176f9 100644 --- a/Examples/ResourceApp/ResourceApp/Base.lproj/Main.storyboard +++ b/Examples/ResourceApp/ResourceApp/Base.lproj/Main.storyboard @@ -1,9 +1,9 @@ - + - + @@ -38,7 +38,7 @@ - + @@ -114,12 +114,12 @@ - + -