Skip to content
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

Check SQLite.framework reference -- iOS? #10

Closed
roblg opened this issue Dec 29, 2023 · 4 comments
Closed

Check SQLite.framework reference -- iOS? #10

roblg opened this issue Dec 29, 2023 · 4 comments

Comments

@roblg
Copy link

roblg commented Dec 29, 2023

Summary

I had some trouble getting an initial build to work in Xcode after cloning SQLite.swift.

I had to update the (relative path) reference to SQLite.swift from within Xcode (took an embarrassingly long time because I'm not a daily Xcode user...) but then I ran into another issue: a build failure due to a missing build directory:

Showing All Messages
No such file or directory: '/Users/<username>/Library/Developer/Xcode/DerivedData/rem-gzgveujhyqjmemcyrgrqjanzsmqi/Build/Products/Debug-iphoneos/SQLite.framework/SQLite'

Note: Debug-iphoneos - I don't have anything except the macOS SDKs installed.

I poked around on the internet and tried to read between the lines, but ultimately fixed it by deleting SQLite.framework in the rem target Build Phases section under both Link Binary with Libraries and Embed Frameworks and re-adding it, taking care to add the macOS SDK, not the iPhone version. After that my builds succeeded.

Screenshot:

image

Additional Info

I'm not sure if it's portable, but the relevant git diff in my .xcodeproj file is:

a/rem.xcodeproj/project.pbxproj b/rem.xcodeproj/project.pbxproj
index 6f2ec5e..9a66d6f 100644
--- a/rem.xcodeproj/project.pbxproj
+++ b/rem.xcodeproj/project.pbxproj
@@ -7,6 +7,8 @@
 	objects = {

 /* Begin PBXBuildFile section */
+		78349C542B3DE8630009C28F /* SQLite.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 96E66BC32B2F5745006E1E97 /* SQLite.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+		78349C582B3DE9050009C28F /* SQLite.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96E66BC32B2F5745006E1E97 /* SQLite.framework */; };
 		961C95DA2B2E19B30093F228 /* remApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961C95D92B2E19B30093F228 /* remApp.swift */; };
 		961C95DC2B2E19B30093F228 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961C95DB2B2E19B30093F228 /* ContentView.swift */; };
 		961C95E12B2E19B40093F228 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 961C95E02B2E19B40093F228 /* Preview Assets.xcassets */; };
@@ -19,8 +21,6 @@
 		961C96152B2EBEE50093F228 /* DB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 961C96142B2EBEE50093F228 /* DB.swift */; };
 		969BA2EC2B3D1D46009EE9C6 /* SettingsManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 969BA2EB2B3D1D46009EE9C6 /* SettingsManager.swift */; };
 		969F3EFF2B3A8C4D0085787B /* HotKey in Frameworks */ = {isa = PBXBuildFile; productRef = 969F3EFE2B3A8C4D0085787B /* HotKey */; };
-		969F3F042B3B70560085787B /* SQLite.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96E66BBF2B2F5745006E1E97 /* SQLite.framework */; };
-		969F3F052B3B70560085787B /* SQLite.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 96E66BBF2B2F5745006E1E97 /* SQLite.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		969F3F082B3B7C7C0085787B /* RemFileManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 969F3F072B3B7C7C0085787B /* RemFileManager.swift */; };
 		969F3F0B2B3CB2110085787B /* Field.swift in Sources */ = {isa = PBXBuildFile; fileRef = 969F3F0A2B3CB2110085787B /* Field.swift */; };
 		969F3F0D2B3CCEC30085787B /* Ask.swift in Sources */ = {isa = PBXBuildFile; fileRef = 969F3F0C2B3CCEC30085787B /* Ask.swift */; };
@@ -162,7 +162,7 @@
 			dstPath = "";
 			dstSubfolderSpec = 10;
 			files = (
-				969F3F052B3B70560085787B /* SQLite.framework in Embed Frameworks */,
+				78349C542B3DE8630009C28F /* SQLite.framework in Embed Frameworks */,
 			);
 			name = "Embed Frameworks";
 			runOnlyForDeploymentPostprocessing = 0;
@@ -201,7 +201,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				969F3F042B3B70560085787B /* SQLite.framework in Frameworks */,
+				78349C582B3DE9050009C28F /* SQLite.framework in Frameworks */,
 				969F3EFF2B3A8C4D0085787B /* HotKey in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;

Other

OMG thank you for posting this. I've been meaning to take a poke at it, but it's much easier to have a skeleton to work inside since I'm not a Swift/Objective-C user normally.

@ruslanjabari
Copy link
Contributor

Nice catch. I wonder if some of the changes in #8 fixed it?

@jasonjmcghee
Copy link
Owner

jasonjmcghee commented Dec 29, 2023

@ruslanjabari just opened: #8. I'm taking a look at it now - in a very broken state locally 😅 so it's taking a few.

Any opinions on Cocoapods vs Carthage vs. Swift Package manager vs. local?

@ruslanjabari
Copy link
Contributor

I am personally not the biggest fan of Xcode so will always default away from using it but the rational decision is likely to just use XCode's internal package manager.
E.g.,
Screenshot 2023-12-28 at 7 38 44 PM
Screenshot 2023-12-28 at 7 38 52 PM
Screenshot 2023-12-28 at 7 39 01 PM

@roblg
Copy link
Author

roblg commented Dec 29, 2023

Can confirm, #8 fixed me (and also fixed some resulting code signing issues I was having and hadn't started to debug yet). 🙇‍♂️

@roblg roblg closed this as completed Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants