Skip to content

Bugfix/cocoa deployment #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
- uses: actions/checkout@v3
- name: Install dependencies
run: sh scripts/install.sh
- name: Run pod lib lint
run: pod lib lint --verbose --allow-warnings --sources='https://cdn.cocoapods.org/'
# END COPY PASTE FROM TEST.YML

deploy-cocoapods:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ jobs:
- uses: actions/checkout@v3
- name: Install dependencies
run: sh scripts/install.sh
- name: Run pod lib lint
run: pod lib lint --verbose --allow-warnings --sources='https://cdn.cocoapods.org/'
2 changes: 1 addition & 1 deletion Backtrace.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ Pod::Spec.new do |s|
s.tvos.public_header_files = ["Backtrace-tvOS/**/*.h*"]
s.static_framework = true
s.dependency "PLCrashReporter", '1.11'
s.resources = 'Sources/**/*.xcdatamodeld'
s.resource_bundle = { 'BacktraceResources' => 'Sources/**/*.xcdatamodeld' }

end
304 changes: 284 additions & 20 deletions Backtrace.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
source 'https://cdn.cocoapods.org/'

# Library
project 'Backtrace.xcworkspace'

# Definitions
def shared_pods
Expand Down
4 changes: 2 additions & 2 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ EXTERNAL SOURCES:
:path: "./Backtrace.podspec"

SPEC CHECKSUMS:
Backtrace: c0a4280935bff4ac8d84faedc5f79a7b582b9204
Backtrace: a90dcc0f33cb29155c5b15209fbb5be30137ad29
Nimble: 5316ef81a170ce87baf72dd961f22f89a602ff84
PLCrashReporter: 7a9dff14a23ba5d2e28c6160f0bb6fada5e71a8d
Quick: 749aa754fd1e7d984f2000fe051e18a3a9809179

PODFILE CHECKSUM: e47f2680ac506c05a737c701413cc45490f16077
PODFILE CHECKSUM: 9879217fb9b028733c19f11520859f8869f67aba

COCOAPODS: 1.15.2
4 changes: 3 additions & 1 deletion Sources/Features/Repository/PersistentRepository.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ final class PersistentRepository<Resource: PersistentStorable> {
.persistentRepositoryInitError(details: "Couldn't find model url for name: \(momdName)")
}
#else
guard let modelURL = Bundle(for: type(of: self)).url(forResource: momdName, withExtension: "momd") else {
guard let bundleURL = Bundle(for: type(of: self)).url(forResource: "BacktraceResources", withExtension: "bundle"),
let resourcesBundle = Bundle(url: bundleURL),
let modelURL = resourcesBundle.url(forResource: momdName, withExtension: "momd") else {
throw RepositoryError
.persistentRepositoryInitError(details: "Couldn't find model url for name: \(momdName)")
}
Expand Down
5 changes: 5 additions & 0 deletions Sources/Features/Resources/Crash+CoreDataClass.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Foundation
import CoreData

@objc(Crash)
public class Crash: NSManagedObject {}
16 changes: 16 additions & 0 deletions Sources/Features/Resources/Crash+CoreDataProperties.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Foundation
import CoreData

extension Crash {

@nonobjc public class func fetchRequest() -> NSFetchRequest<Crash> {
return NSFetchRequest<Crash>(entityName: "Crash")
}

@NSManaged public var attachmentPaths: [String]?
@NSManaged public var dateAdded: Date?
@NSManaged public var hashProperty: String?
@NSManaged public var reportData: Data?
@NSManaged public var retryCount: Int64

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="21513" systemVersion="22D68" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
<entity name="Crash" representedClassName="Crash" syncable="YES" codeGenerationType="class">
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="22758" systemVersion="23F79" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
<entity name="Crash" representedClassName="Crash" syncable="YES">
<attribute name="attachmentPaths" attributeType="Transformable" valueTransformerName="" customClassName="[String]"/>
<attribute name="dateAdded" attributeType="Date" usesScalarValueType="NO"/>
<attribute name="hashProperty" attributeType="String"/>
Expand Down
1 change: 1 addition & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ set -o xtrace # to trace what gets executed. Useful for debugging
fastlane ios tests
fastlane mac tests
fastlane tvos tests
pod lib lint --verbose --allow-warnings --sources='https://cdn.cocoapods.org/'
Loading