Xcode 13 automatic version update for binaries and frameworks - opt out - xcode

In Xcode 13 we have a new possibility, that is default on, to update binary version that is uploaded to appstoreconnect.
It is called Manage Version and Build Number.
It updates versions of the main app binary and also for embedded frameworks that are also compiled as a part of the project.
I would like to opt out for some frameworks from that behaviour. Is there a way to tell, that this particular framework version must not be updated?

Related

How to specify a pre-release package dependency in Xcode?

How do you configure Xcode (13.2) to add a dependency on a pre-release version of a package?
For example, right now Sparkle has a 2.1.0-beta.2 release which I would like to test in my app.
More accurately stated, I would like to accept 2.1.0-beta.x up to and including the full release of 2.1.0 and I'd like Xcode's "Update to latest package versions" to find the new releases for me without me changing anything in the configuration (eg like you can do with npm).
I can't find any obvious way to achieve this using the Xcode UI. If indeed you can't, is there a way to specify this version range by editing a config directly?
As mentioned here, 2.1.0-beta.2 < 2.1.0, which is why I have tried 2.0.0 in the screenshot.

Automatic version management using agvtool

Xcode 11 has changed the way that versions are handled.
So far I had two targets, Dev & Prod, each with a separate versions. Prod version would be entirely manual, Dev would be automated:
During a build, a script would run, which then would fetch git tags. One tag would contain information about the latest Dev version. If it's newer, it would update version inside Info.plist just for the Dev target
When Dev would be deployed using a script (create an ipa, resign for in-house distribution, upload), the build version would then be increased. Remote tag containing version information would then be updated
In this way everyone's dev version would get automatically synchronized and managing multiple dev builds would be be easy. Prod would be updated relatively infrequently so it can be managed manually.
However, in Xcode 11 whenver version (or build) is updated inside the General tab, entries in Info.plist are replaced with $(CURRENT_PROJECT_VERSION) and $(MARKETING_VERSION) and Current Project Version and Marketing Version inside the build settings tab is used instead.
So far I would use PlistBuddy in order to read and update versions inside Info.plist, but from what understand now I'd have to use agvtool. However, there are two issues with it:
If it's ran as a Run Script phase, it causes the build process to cancel
It is unable to handle separate versions for two targets (so I cannot just automatically manage Dev, while leaving Prod alone)
I know that theoretically I can still use Info.plist for versioning, but the moment someone changes version manually in the General tab, the whole thing will get messed up (from experience I know that this will happen).
I have two questions:
Is my understanding of the process correct?
Can still have a version management system using agvtool similar to what I had before?

Flutter version information not used by Xcode

In my iOS project, I have the following settings in the Runner -> General tab, under the Identity section:
Version: $(FLUTTER_BUILD_NAME)
Build: $(FLUTTER_BUILD_NUMBER)
which is the same as when creating a brand new Flutter project. However, when I was going to create an Archive for releasing my app, Xcode complained that those fields were missing or incorrect (I don't remember the exact error message).
The only way I could build the release app was to change them to hardcoded strings - i.e. 1.0.0 and 1 respectively. What could be causing this issue? It would be a nuisance to have to remember to update those for every release, and I shouldn't have to, right?
If you created this project with an older Flutter version
several files created in the ios/ and android/ sub-directories might be outdated.
Newer Flutter versions might generate these files a bit differently and projects created with older Flutter versions might cause issues.
Ways to fix
Delete the ios/ and android/ directories and run flutter create . to re-generate these directories.
HINT
Custom changes will be lost and need to be re-applied. This is easiest if the project is committed to a version control system like Git.

How to create spec for new major library version?

I've recently released version 4 of SBJson. This is a new major version that is not backwards compatible. Since SBJson is widely bundled by other popular libraries I renamed all the classes & enums to make sure it can be used in conjunction with prior versions.
However, I'm not sure how to best handle this situation with CocoaPods. I contributed a 4.0.0 spec to the existing SBJson specs, but I suspect it will be impossible to install version 3.2 and 4.0.0 in the same project. Do I have to clone the 4.0.0 spec into a SBJson4 (notice extra major version number in name) spec as well?
Morning.
If you want users to have both versions installed simultaneously they will probably have to be separate pods.
AFAIK you can't have one pod installed twice in a project. I don't even know how you'd get round the linker errors etc. for that to be possible!

Xcode: How to use separate Projects with cross-project references to embed a framework in your application?

I am using Xcode 4.3.
I have an existing Xcode Project (originally created in Xcode 3) for a embeddable Mac OS X Framework. This Project has a few Targets, but the primary Target in this project is for my Framework. This Framework is designed to be embedded in Mac Apps and has the appropriate Installation Directory properties set. (#executable_path/../Frameworks)
I have a new Xcode Project (created just now in Xcode 4) for a Mac OS X Application. There is only a single Mac App Target in this Project.
I would like to combine my old Framework Project and/or Target into the new App Project so that I can build both the App and Framework from source in a single, combined build process. (I have done this in Xcode 3 many times, but cannot figure it out in Xcode 4).
I do not (unless it's the only way) want to build my Framework separately and then just link to it from my App Project. I want to combine the Framework Target into my Mac App Project.
Here's Apple's outdated documentation describing how to do what I want in Xcode 3:
Embedding a Private Framework in Your Application Bundle > Using Separate Xcode Projects For Each Target
How do you do this in Xcode 4?
Note: I just need to know how to add my Framework Target to the new Project. From there, I know how to add the dependencies and do all the Build Phases of linking and copying the built Framework into the app bundle.
After working through a tricky issue in Xcode 4.3.1, I discovered how to do this. I've given a full/detailed example in my answer to another question about how to embed ParseKit in a Mac App.
I also found excellent information on the topic in Chapter 16 of Mastering Xcode 4 by Joshua Nozzi.
You actually have 2 separate Xcode project files here: Application and Framework. The answer is the section below the one you find: Using Separate Xcode Projects For Each Target
Edit:
OK. Now I remember. You need to create a workspace and add both projects to it. Then you can add target in one project to the other for dependency: Adding an Existing Project to a Workspace
I don't have all the details since I don't have a Mac now. But I think you can figure it out once you created the workspace.

Resources