xcode version visible from the ipa - xcode

I have few versions of Xcode installed in my mac.
Lately I noticed that some of my code compiles and does what it should when built using xcode 4.6.3. But it does not behave as expected when built using xcode 4.4.1.
Question: Is it possible to know about the xcode version from the ipa (iOS application) itself?
Thanks and I shall really appreciate sharing your knowledge and thoughts on this.

If you can browse down to your Info.plist, there is a field called DTXcodeBuild and it will have a string value, like 4H1503. You can actually go to your xcode archive or .app and Open Package Contents, and then go to Products/Applications/YourApp.app and Open That package contents. The Info.plist should be in the root. That is where you'll find your DTXCodeBuild.
That is for an .app file. .IPA is a different though. It should be a binary. You could rename it to a .zip and look around, but chances are you won't find too much in there. Look at this thread discussing, ipa, renaming it, and the binary aspect of it:
https://discussions.apple.com/thread/4258197?start=0&tstart=0

Related

Go - How to link Go macOS binary in an Xcode project?

I'm completely new to macOS development, this might sound quite basic.
I need to distribute a Golang app for macOS.
I built the Go executable for macOS, the executable works fine on macOS.
I made its .app structure following this tutorial
But before distributing it, I need to do a few things like code signing & integrating Sparkle (for updates).
For that, I need to open this .app as a Xcode project. How do I do that ?
Xcode recognizes .xcodeproj extension
I created a sample Xcode Objective-C project but how do I get this project to run my executable/.app ?
You do not need to open the app as an Xcode project - that doesn't make sense as such and cannot be done, as the app is not an Xcode project.
I would suggest instead using the gon tool you can find here for code signing.
The easiest way to install it is usually through HomeBrew by running:
brew tap mitchellh/gon
brew install mitchellh/gon/gon
The above requires you to have HomeBrew installed in advance.
After installing, you create a config.json file as described on the gon GitHub page, and then run:
gon config.json
That will sign, zip, notarize and staple your application for you - creating a .dmg file for distribution.
In regards to Sparkle for easily updating your program, this is something you have to integrate into your Go program. You can find an example of how to do that here.
The example contains a simply Objective-C function sparkle_checkUpdates() that uses the Sparkle framework to invoke the updating mechanism. It also contains a Go function sparkle_checkUpdates() that use C imports to call that C function described before.
In your existing Go program, you just need to call that sparke_checkUpdates from somewhere when the user wants to check for updates.

AudioKit 4.11.2 Playgrounds: "No such module AudioKitPlaygrounds"

It has been a year since updating so I downloaded AudioKit 4.11.2 yesterday. I built all of the frameworks, including the AudioKit and AudioKitUI xcframeworks.
Then I began playing with the Playgrounds. Right away Xcode tells me the build failed because it can't find the AudioKit frameworks. It appears that the Search Paths that are set in the original project file need tweaking so I set it to "$(inherited)../Frameworks".
Now it builds but still will not run, saying on the import AudioKitPlaygrounds statement that there is No such module AudioKitPlaygrounds.
Odd, because that is the target of the build and it exists in the Derived Data Products folder.
Searching through StackOverflow shows that AudioKit has had similar problems like this in the past but none of the proposed solutions seemed relevant to my situation.
What other tricks are necessary to get the Playgrounds running? Shouldn't it build and run straight out of the box without messing with the project search paths?
My environment is:
macOS 10.15.6
MacBookPro
Xcode 12.0.1
I ran through a similar problem with macOS 10.15.7, XCode 12.1 and AudioKit 4.11.2.
I got the same “No such module AudioKitPlaygrounds” message.
The "Build Active Scheme" option was unchecked in my File Inspector >> Playground Settings, so I checked it, rebuild the "Introduction and Hello World" .playground and it worked.
Edit (04/15/2021): David Thery gave a more complete answer in the following answers.
Also, make sure to:
run 'pod install' + automatically converting to swift5 in XCode
check "Build Active Scheme" as mentioned by Miguel FOR EACH single playgrounds you want to run.
run the playground with the play button in the editor, not the xcode main run button
If you want instead to use AudioKit in another XCode project, only two steps:
download AudioKit and AudioKitUI frameworks from here:
embed them in General > Frameworks, Libraries, and Embedded content, as shown on the screenshot below.
How did you build the frameworks? The assumption when it comes to the paths in other projects (including Playgrounds) is that they have been built via the build_frameworks.sh and build_xcframework.sh scripts in the Frameworks directory.
The end result should be a set of XCFrameworks in that same Frameworks directory, which is in turn referenced by examples and the playgrounds project.
To anyone still experiencing this issue, I just found a really simple solution. I was opening my playground files directly from 'Open Recent'. Problem is, Xcode doesn't automatically look at the parent directory and included files. Just close Xcode and open the AudioKitPlaygrounds.xcodeproj from finder. When you open your playground files from there they should work properly.

How to create an app bundle with an exe and a directory hierarchy?

I am struggling to create macOS application bundle that follows this hierarchy.
I am currently on XCode 10.1 and I also have XCode 9.0.
However, I just cant find a way to get the folder hierarchy as mentioned in the above link.
Specifically, I want to have the localization .lproj directories in Contents/Resources and app exe in Contents/MacOS.
I do File-->New-->Project but I just cant seem to find an option which will produce this hierarchy.
Am I
missing something obvious here ?
using a wrong version of XCode ?
TIA

Compiling Xcode project from zipped open-source GitHub download

Possibly basic question but I'm not sure where to begin for an answer. I am very much a newbie to Xcode, Cocoa, Swift and Objective-C.
I'm interested in developing an open-source Markdown editor for the Mac that will build from existing open-source code. I have gone to GitHub to download the source code for two existing projects, MacDown and WriteDown! For both projects I download the project .zip file (and am happy that the button to do so is now easily available), and extract the .zip file's contents on my hard drive. In each project there is an .xcodeproj file which I open up in Xcode... and I see tons of errors, mostly because of things that are missing, so I cannot build and run them.
With WriteDown I see "missing base SDK" (and get a corresponding error when I try to run it), and many other files missing (frameworks, products, and "pods"). With MacDown I get a lot of errors mentioning missing pod files.
If it were just the one project that gave me errors I would assume this was something specific to that project, but since they're both giving me errors it sure seems like I'm doing something wrong in general. Should I be downloading something other than the downloadable zip? Downloading extra frameworks? Taking an extra step in between?
I am using Xcode 6.1.1 on OS X 10.9.5, which MacDown seems to indicate it's compatible with.
Few things:
1) If an .xcworkspace is available, you should open that in lieu of the .xcproj. The workspace contains multiple projects that are important for the building of the application.
2)
Check out this answer for "Missing Base SDK" XCODE Base SDK Missing
3) Go to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs and check to make sure you have the proper system SDKs available
4) It looks like those projects also require CocoaPods, a OS X Dependency Manager. You need to download the "pods" AKA 3rd party dependencies in order to build the application

Adding a Library to your build and link path in XCode

I am tryingo to build a GUI application using the JUCE framework on MAC OSX.
I have dowloaded all the API's and got a small hello World program running fine.
However, when I add files to my Xcode project I get compilation errors that say that the Juce library files don`t exist. I would like to know how to get the library API in the build and link path in XCode so that it finds the neccesary files for compilation.
What I would do on Visual Studio going to properties and adding aditional library dependencies, is what I need to do in XCode but I don't know how.
Any help greatly appreciated.
thanks.
Old question but maybe a useful answer in the future....
If you have the "Hello World" up and runnning, it should already be linked to the library. Are you using the introjucer? This should help get everything up and running for you. If you are, you need to add classes etc to the introjucer, as this sets up Xcode / VStudio for you. If not, (Presuming XCode 3 as you are using leopard) goto Xcode > Preferences. Scroll along to source trees, and add the path to the juce folder in there.

Resources