sticker extension CFBundleVersion mismatch - ios

NOT A DUPLICATE (see more below).
ItunesConnect gives me a warning with :
appex does not match the CFBundleVersion
It seems the error is related purely to the appex which seems to be a compiled version of my sticker extension.
Both targets (app and stickers) obviously have the same CFBundleVersion (both in plist and in target > general > build).
The culprit is the plist inside the .appex file (can see it with show package contents), i don't understand why it is different from the one used by the target.
From what i found it seems when archiving xcode creates a new .app file that will be only in the archive thus creating a new plist file but apparently some things in the appex file are not updated.
What are the possible options to fix this permanently ? I modified the value inside the file but i am not sure it will stick.

So if any of you guys uses a build script to bump your CFBundleVersion make sure to place it before the Copy Bundle Ressources phase.

Related

Setup iOS icon from Qt

Because of this unsolved problem I have to assemble my Qt Creator projects to Xcode projects and run it there. So, I need to setup icon for iOS app version. I tried two ways:
1.
I can add icons and Info.plist inside ready Xcode project. It works pretty well, but I have no desire to do that every time I assemble Qt project to Xcode project.
2.
Thus, I tried to add icons and plist to pro-file:
ios {
ios_icon.files = $$files($$PWD/ios/AppIcon*.png)
QMAKE_BUNDLE_DATA += ios_icon
QMAKE_INFO_PLIST = ios/Info.plist
}
This way I get incorrect Xcode project. There is no Info.plist in the files of project tree, however I have references to that file (in the folder of Qt project, it's not copied) in Target -> Build Settings -> Packaging -> Info.plist file. App icons of different size are presented in Xcode project, but they are references, not copies. When trying to run, I get:
Installation failed. Invalid argument.
After coping icons and plist to that project, it runs well, but application title is ${PRODUCT_NAME}.
I also tried to setup copying of Info.plist in pro-file these ways, but got the same results.
Does anybody know what is going on here??
Open the Xcode bulid file and go to build Settings>product bundle identifier . Now set any bundle id in the field . Now run the project , it will automatically create info.plist file and other set up like standard .

Client.ipa does not contain a file

I am pulling my hair out on this error since the past few days. When I try to submit my cordova based iOS app I get an error that Symbols tool failed. This is What i have in my logs:
<IDEDistributionIssue: severity(error), error(Error Domain=ITunesSoftwareServiceErrorDomain Code=-19066 \"The path '/var/folders/sp/fhnmn9hd76vbdl523pf37krw0000gn/T/XcodeDistPipeline.8PQ/Packages/Healthpick Client.ipa' does not contain a file.\" UserInfo={NSLocalizedDescription=The path '/var/folders/sp/fhnmn9hd76vbdl523pf37krw0000gn/T/XcodeDistPipeline.8PQ/Packages/Healthpick Client.ipa' does not contain a file., NSLocalizedFailureReason=Unable to validate your application.})>
Here is a screenshot of the said error upon trying to submit to the app store:
Please help.
I had the same error because there were several static libraries (libXXX.a) erroneously included in the app's package. They were showing in the final upload confirmation box (listing Entitlements & Certificates), under the main .App.
My solution was to remove all references to those static libs from the project, adding them manually in the linker flags and library search paths.
There is certainly a better solution to prevent those files from being included. Hopefully someone more knowledgeable about Xcode can chime in.
I had the same symptoms as Benoit, and was able to remove the erroneously showing libXXX.a files from the app's package by doing the following:
Select the main project file
Select the app's target
Select "Build Phases"
Select "Copy Bundle Resources"
Remove any items related to the lib files that had been showing up in the app's target previously. In my case it was files related to Flurry.
Untick:
Include app symbols for your application on Validate and upload to App Store.
And Bitcode.
I seem to get this on XCode 8.3.1 when uploading an archive when my device is connected. When I unplug my device and try again it works.

Crashlytics Framework doesn't detect the Info plist on iOS

I am trying to add Crashlytics framework in my project, however, when I go through the process and reach the point where I add the framework to the project. The "Fabric" script plugin on the Mac doesn't detect that the frame work has been add to the project, and I think because the it doesn't detect the Info.plist in my project as I have changed the name of the Info.plist to something else. I have tried to change it back to Info.plist but still doesn't work.
How can I make the framework to detect the info.plist in my project.
Thanks
I'm not sure if what I encountered was the same thing, but when trying to archive my project, I received the following error:
❌ error: Fabric: Info.plist Error
I poked through the output in XCode which mentioned it could be a timing issue and to make sure that I made the "Fabric" build phase one of the last build phases. So I updated the XCode configuration and made the Fabric step run just before the "Upload Symbols to Fabric" step, and this cleared up the issue. See the image below.
The root cause for me was an empty Bundle Identifier (although the key was set in info.plist).
After setting up a new XCode-project as a copy of another one i copied the info.plist with all keys into the new project. But it uses variables like $(PRODUCT_BUNDLE_IDENTIFIER), which was assigned somewhere else (maybe in the project file, that i haven't copied also)
In the screenshot the field with the round oval was empty then as a result. After applying the correct bundle identifier, everything has built fine.
Xcode 10 only:
Add your app's built Info.plist location to the Build Phase's Input Files field:
$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
Move the RunScript in Target -> Build Phase to the last and give it a try:
Did you add the Fabric NSDictionary entry to your .plist(s)?
Set absolute path of Info.plist in "Input Files"
Add/Change "Input Files" value in Run Script added for Fabric under "Build Phases"
From "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)" To "new path*/Info.plist"
*new path: You can also get Info.plist path from Build Settings -> Packaging -> Info.plist File
Add your app's built Info.plist location to the Build Phase's Input Files field:
$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
Note: Put exact same lines as given above to resolve this issue I am using Xcode_10.1 and this is working perfectly fine for me and on Fabric official website they specifically mention the same solution as given abovePlease refer this image to see attached screenshots of Xcode to get more details about where to put this line
Xcode 10 only:
Add your app's built Info.plist location to the Build Phase's Input Files field:
$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
at the same time, Move the runscript to the last row.

Watch kit CFBundleVersion

Planning for watch kit integration
error: The value of CFBundleVersion in your WatchKit app's Info.plist (1) does not match the value in your companion app's Info.plist (2.0). These values are required to match.
Struck with above error.
- changed the deployment targets of both notification & watchkit app. But build failed
Thanks.
You need to make sure that the CFBundleVersion in the Info.plist of your WatchKit App is identical to the CFBundleVersion in your parent app’s Info.plist.
For those of you who struggling with adapting your build autonumbering scripts (like this one) to WatchKit and getting the same dreaded The value of CFBundleVersion in your WatchKit app's Info.plist ... does not match the value in your companion app's Info.plist ... error, here is the solution: set Strip Debug Symbols During Copy to No for the project, remove same option overrides for all targets, make clean (Cmd+Shift+K) and build (Cmd+B).
Disclaimer: this is more hack than a solution, I don't know why it works, but it's the only way I got my autonumbering script working with WatchKit and I think this information would be useful for someone. If you have better ideas, please share.
Update: finally found a real solution. Turns out even without UI one could easily add a run script to WatchKit App target by manually editing project.pbxproj. Thank you, Curtis Herbert!
error: The value of CFBundleVersion in your WatchKit app's Info.plist (14) does not match the value in your companion app's Info.plist (13). These values are required to match.
I finally figured out the problem is the value of my companion app 's Info.plist which equals to 13, is not equal to that value in WatchKit App.
So you have to make sure that the Bundle version panel 's value in each Info.plist is matched.
After installing WatchKit application extension.There was conflict in
Bundle versions string, short && Bundle version .
So Update both of Keys to values which are equals in both the Extension and main app targets in info.plist file .
&&
When ever you get such problems after updating build number or version. Please follow the steps, which worked for me :
Clean the project
Try to run the project in any one of the simulators
Build or Archive
welcome to the party. I was able to work through this by editing the Info.plist ion both Watchkit App and Watchkit Extension, and then editing the marketing version in the AppName(root level)/Targets/AppName/Versioning/Marketing Version.
Hope this helps anyone else that comes across this issue.
I got this error when I create new target watch kit with different team selected by default while creating the watch app for ios app so i just deleted the targets and again add with same team as my project.

Installation Failed "Invalid argument" when trying to run Today application extension

I added a vanilla Today Application Extension and run with the new scheme created by XCode.
After it finishes building ("Build Succeeded" pops up), it failed straight away with this error:
Installation Failed
Invalid argument
I've been trying to find answers for 6 hours now, no luck so far.
Please help!
Check if the Bundle Identifier isn't empty in the Info.plist
Try this:
Quit Xcode
Clean out ~/Library/Developer/Xcode/DerivedData manually
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
iOS Simulator > Reset Content and Settings
Maybe you are bundling a conflicting "contents" referenced (blue) folder.
Hint: change the name of said "contents" folder :)
This issue occurred in my case when the phone's memory was too low to install the app. I've cleaned up the phone and voila!
Another hint might be this post.
This can also happen in Xcode 7 because "Upgrade to recommended settings" will change CFBundleIdentifier to point to $(PRODUCT_BUNDLE_IDENTIFIER) instead of the old $(BUNDLE_IDENTIFIER).
Apple says in the Xcode 7 release notes that PRODUCT_BUNDLE_IDENTIFIER is now "the recommended place to set the Bundle Identifier for a target." So if you're using BUNDLE_IDENTIFIER anyplace else in your project, be sure to change it to PRODUCT_BUNDLE_IDENTIFIER to keep things in sync.
I was getting the same error - although in different conditions - and it took me a while to realise that I had inadvertently messed with the Info.plist (thank you user2866588!) via a Search & Replace operation.
Once fixed that file, the error went away. It's a long shot, but you never know...
I got this error when my test phone had low memory (around 288MB free). After restart and clearing some cached data, I was able to install my app.
Image description here.!! I got this Error Just Enter Bundle Identifier. (You can get bundle identifier by right click on info.plist and go to Open as than Source Code here just find this CFBundleURLSchemes below this name a string tag contains your bundle identifier) Copy Bundle identifier and past it on TARGET select General now on Identity you will see Bundle Identifier paste there and enter. then just run the code. Happy Coding!!!
What I found is that info.plist file should never been localized! I tried to localize my project and tried to tap Localization on all plist and string files. As a result, I could not install my app to Simulator, invalid argument error.
I spent 1.5 days trying to find out reason. I tried all the solutions as listed above, but with no luck. Finally, discard all my localization changes and redo it again. This time, I tried to localize one file first, and then compiled codes and trie to run my app on Simulator.
The issue is info.plist file. You could localize it. The result is that en version is moved en.lproj folder. That is to say, no more info.plist file in the project folder. As a result, Xcode could not find it and exception raised.
Another way to verify it is to check your project settings. Select your target and general tab. The Identity should be like:
If your project settings are something like this, you have to locate info.plist, that means info.plist is missing.
You just cannot locate localized info.plist in en.lproj folder from project settings.
Don't localize info.plist file directly. You can localize it by localizing infoplist.strings file.
This may be one of reasons to get invalid argument exception, as in my case.
I also wrote a blog on this.
I got the same issue and it was because of low memory on phone.
I deleted some apps and restarted the phone which brought by available storage.
I got this error after installing new pods (AWS) to my project. Somehow the entry in the Build Settings for Info.plist file was cleared. Entering the correct filepath (find in finder) my project finally compiled again.

Resources