17

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.

Vvk
  • 4,031
  • 29
  • 51
Rajesh
  • 10,318
  • 16
  • 44
  • 64

7 Answers7

27

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.

LoVo
  • 1,856
  • 19
  • 21
  • 2
    According to your error message it is still different Watch App Bundle = 1.0 and AppBundle = 2.0. Did you try to clean after you changed the values? – LoVo Apr 10 '15 at 13:55
  • I have both identical, passing in an interpolated parameter. The next time I ran, I saw this error, without changing anything - is this an XCode issue? – ArielSD Oct 27 '17 at 16:04
  • 1
    I'm pretty sure I just cleaned, cleaned the build folder, and restarted XCode! – ArielSD Feb 16 '18 at 01:42
  • I got the same issue. I have changes iOS version to 7 but did not change the associated watch app. In watch app was 6. I make both build number to 7. It worked. – Anil Gupta Sep 26 '20 at 07:36
7

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!

Michal Šrůtek
  • 1,647
  • 16
  • 17
Alexander Vasenin
  • 11,437
  • 4
  • 42
  • 70
  • 1
    *Comment by [user1446940](http://stackoverflow.com/users/1446940/user1446940) posted as an answer to this question:* I fixed this issue by moving my run script phase that incremented the build numbers for the target and extensions (watchkit ext/app and today widget) to the end of the build phases. For some reason they were being incremented at different times and xcode saw them as different values and raised an error even though they would be the same before and +1 after. – Artjom B. Jun 14 '15 at 16:57
  • You also need to make sure that the Run Script (in Build Phases) are just below Copy Bundle Resources, otherwise you get an error and failed build. – Magnus Apr 04 '16 at 20:19
  • Xcode 10 has the ability to add the Build script via UI, however it's still yielding an error for me with the usual complaint of mismatched bundle versions. Is it because the watch kit validates the versions before the app's version is built? My dependencies cause WatchKit to build before the App. – Buddhisthead May 16 '19 at 19:07
3

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.

enter image description here

Zigii Wong
  • 7,766
  • 8
  • 51
  • 79
2

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 .

enter image description here

                                 &&

enter image description here

Shrawan
  • 7,128
  • 4
  • 29
  • 40
0

When ever you get such problems after updating build number or version. Please follow the steps, which worked for me :

  1. Clean the project
  2. Try to run the project in any one of the simulators
  3. Build or Archive
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
0

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.

activereality
  • 41
  • 1
  • 5
0

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.

Zeeshan Ahmad II
  • 1,047
  • 1
  • 5
  • 9