Skip to content

Commit

Permalink
Modify project.yml for xcodegened project with Frameworks (#1717)
Browse files Browse the repository at this point in the history
Migration: migrate from cocoapods.
What: created project.yml and refactored code to be able to build from frameworks

Steps:
> brew upgrade xcodegen
> xcodegen
> xed Ruuvi\ Station.xcodeproj/
> Build and Run
  • Loading branch information
rinat-enikeev authored Nov 23, 2023
1 parent 236213d commit 93203fd
Show file tree
Hide file tree
Showing 69 changed files with 1,282 additions and 242 deletions.
22 changes: 22 additions & 0 deletions Common/RuuviLocalization/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
5 changes: 5 additions & 0 deletions Common/RuuviLocalization/target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
targets:
RuuviLocalization:
templates:
- CommonFramework
22 changes: 22 additions & 0 deletions Common/RuuviPresenters/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ import UIKit

extension Bundle {
public static func pod(_ clazz: AnyClass) -> Bundle {
if let module = NSStringFromClass(clazz).components(separatedBy: ".").first,
let bundleURL = Bundle(for: clazz).resourceURL?.appendingPathComponent("\(module).bundle"),
let bundle = Bundle(url: bundleURL) {
return bundle
if let module = NSStringFromClass(clazz).components(separatedBy: ".").first {
if let bundleURL = Bundle(for: clazz).resourceURL?.appendingPathComponent("\(module).bundle"), let bundle = Bundle(url: bundleURL) {
return bundle
} else if let bundleURL = Bundle(for: clazz).resourceURL, let bundle = Bundle(url: bundleURL) {
return bundle
} else {
assertionFailure()
return Bundle.main
}
} else {
assertionFailure()
return Bundle.main
Expand Down
5 changes: 5 additions & 0 deletions Common/RuuviPresenters/target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
targets:
RuuviPresenters:
templates:
- CommonFramework
22 changes: 22 additions & 0 deletions Modules/RuuviDiscover/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ import UIKit

extension Bundle {
public static func pod(_ clazz: AnyClass) -> Bundle {
if let module = NSStringFromClass(clazz).components(separatedBy: ".").first,
let bundleURL = Bundle(for: clazz).resourceURL?.appendingPathComponent("\(module).bundle"),
let bundle = Bundle(url: bundleURL) {
return bundle
if let module = NSStringFromClass(clazz).components(separatedBy: ".").first {
if let bundleURL = Bundle(for: clazz).resourceURL?.appendingPathComponent("\(module).bundle"), let bundle = Bundle(url: bundleURL) {
return bundle
} else if let bundleURL = Bundle(for: clazz).resourceURL, let bundle = Bundle(url: bundleURL) {
return bundle
} else {
assertionFailure()
return Bundle.main
}
} else {
assertionFailure()
return Bundle.main
Expand Down
16 changes: 16 additions & 0 deletions Modules/RuuviDiscover/target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
targets:
RuuviDiscover:
templates:
- Module
dependencies:
- package: BTKit
- package: Future
- target: RuuviOntology
- target: RuuviContext
- target: RuuviReactor
- target: RuuviLocal
- target: RuuviService
- target: RuuviVirtual
- target: RuuviPresenters
- target: RuuviLocalization
22 changes: 22 additions & 0 deletions Modules/RuuviLocationPicker/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ import UIKit

extension Bundle {
public static func pod(_ clazz: AnyClass) -> Bundle {
if let module = NSStringFromClass(clazz).components(separatedBy: ".").first,
let bundleURL = Bundle(for: clazz).resourceURL?.appendingPathComponent("\(module).bundle"),
let bundle = Bundle(url: bundleURL) {
return bundle
if let module = NSStringFromClass(clazz).components(separatedBy: ".").first {
if let bundleURL = Bundle(for: clazz).resourceURL?.appendingPathComponent("\(module).bundle"), let bundle = Bundle(url: bundleURL) {
return bundle
} else if let bundleURL = Bundle(for: clazz).resourceURL, let bundle = Bundle(url: bundleURL) {
return bundle
} else {
assertionFailure()
return Bundle.main
}
} else {
assertionFailure()
return Bundle.main
Expand Down
12 changes: 12 additions & 0 deletions Modules/RuuviLocationPicker/target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
targets:
RuuviLocationPicker:
templates:
- Module
dependencies:
- package: Future
- target: RuuviOntology
- target: RuuviPresenters
- target: RuuviLocalization
- target: RuuviCore
- target: RuuviLocation
19 changes: 0 additions & 19 deletions Modules/RuuviOnboard/Helpers/Extension.swift

This file was deleted.

22 changes: 22 additions & 0 deletions Modules/RuuviOnboard/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ import UIKit

extension Bundle {
public static func pod(_ clazz: AnyClass) -> Bundle {
if let module = NSStringFromClass(clazz).components(separatedBy: ".").first,
let bundleURL = Bundle(for: clazz).resourceURL?.appendingPathComponent("\(module).bundle"),
let bundle = Bundle(url: bundleURL) {
return bundle
if let module = NSStringFromClass(clazz).components(separatedBy: ".").first {
if let bundleURL = Bundle(for: clazz).resourceURL?.appendingPathComponent("\(module).bundle"), let bundle = Bundle(url: bundleURL) {
return bundle
} else if let bundleURL = Bundle(for: clazz).resourceURL, let bundle = Bundle(url: bundleURL) {
return bundle
} else {
assertionFailure()
return Bundle.main
}
} else {
assertionFailure()
return Bundle.main
Expand Down
7 changes: 7 additions & 0 deletions Modules/RuuviOnboard/target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
targets:
RuuviOnboard:
templates:
- Module
dependencies:
- target: RuuviUser
22 changes: 22 additions & 0 deletions Packages/RuuviAnalytics/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
17 changes: 17 additions & 0 deletions Packages/RuuviAnalytics/target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
targets:
RuuviAnalytics:
name: RuuviAnalytics
templates:
- Framework
dependencies:
- package: Humidity
- package: Future
- package: Firebase
product: FirebaseAnalytics
- target: RuuviStorage
- target: RuuviLocal
- target: RuuviOntology
- target: RuuviVirtual
- target: RuuviUser
- target: RuuviService
22 changes: 22 additions & 0 deletions Packages/RuuviCloud/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import Foundation
import RuuviPool
import RuuviUser
import RuuviCloud
#if canImport(RuuviCloudApi)
import RuuviCloudApi
#endif

public final class RuuviCloudFactoryPure: RuuviCloudFactory {
public init() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ import BTKit
import RuuviUser
import RuuviCloud
import RuuviPool
#if canImport(RuuviCloudApi)
import RuuviCloudApi
#endif

// swiftlint:disable:next type_body_length
public final class RuuviCloudPure: RuuviCloud {
Expand Down
12 changes: 12 additions & 0 deletions Packages/RuuviCloud/target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
targets:
RuuviCloud:
templates:
- Framework
dependencies:
- package: Humidity
- package: BTKit
- package: Future
- target: RuuviOntology
- target: RuuviUser
- target: RuuviPool
22 changes: 22 additions & 0 deletions Packages/RuuviContext/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
11 changes: 11 additions & 0 deletions Packages/RuuviContext/target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
targets:
RuuviContext:
templates:
- Framework
dependencies:
- package: Realm
- package: Realm
product: RealmSwift
- package: GRDB
- target: RuuviOntology
Loading

0 comments on commit 93203fd

Please sign in to comment.