fastlane-old / sigh

Because you would rather spend your time building stuff than fighting provisioning
https://fastlane.tools
959 stars 87 forks source link

resign.sh does not change WKAppBundleIdentifier and WKCompanionAppBundleIdentifier for nested apps #265

Closed mgrebenets closed 8 years ago

mgrebenets commented 8 years ago

This is related to #131 as well.

The setup is like so: I have an app with a WatchKit extension and WatchKit companion app. Those 2 are nested in a standard way: Payload/MyApp.app/MyAppWatchKitExtension.appex/MyAppWatchKitApp.app. They also have bundle IDs like so: com.myapp.prod, com.myapp.prod.watchkitextension and com.myapp.prod.watchkitapp.

Now I need tor resign them using 3 new provisioning profiles, with bundle IDs like so: com.myapp, com.myapp.watchkitextension and com.myapp.watchkitapp.

I run sigh in following way:

sigh MyApp.ipa \
-s "My Sign ID" \
-p com.myapp.prod=new-myapp.mobileprovision \
-p com.myapp.prod.watchkitextension=new-wkext.mobileprovision \
-p com.myapp.prod.watchkitapp=new-wkapp.mobileprovision

The script finishes with "Success" result, but then I go through the IPA and this is what I see in Info.plist files:

MyApp.app
CFBundleIdentifier: com.myapp

MyAppWatchKitExtension.appex
CFBundleIdentifier: com.myapp.watchkitextension
WKAppBundleIdentifier: com.myapp.prod.watchkitapp (!!!)

MyWatchKitApp.app
CFBundleIdentifier: com.myapp.watchkitapp
WKCompanionAppBundleIdentifier: com.myapp.prod (!!!)

It's quite clear that WKAppBundleIdentifier and WKCompanionAppBundleIdentifier are not changed and will cause all kinds of validation problems.

I looked at the script and it's clear that it doesn't change any of these values. I'm not 100% sure how exactly the script should be improved, but it obviously has to change these key-value pairs as well as other nested app related stuff.

Probably, each time it runs resign function it has to check if there are WK... keys in the Info.plist and when found it has to read the bundle ID under that key, then convert this old bundle ID into new bundle ID by chaining provision_for_bundle_id -> bundle_id_for_provison and then replace the value in Info.plist with this new Bundle ID.

asfalcone commented 8 years ago

@mgrebenets Is this issue all set to be closed now?

mgrebenets commented 8 years ago

It is. Closing it. Will be waiting for next release :+1:

fastlanebot commented 8 years ago

This issue was migrated to https://github.com/fastlane/fastlane/issues/2851. Please post all further comments there.

fastlane is now a mono repo, you can read more about the change in our blog post. All tools are now available in the fastlane main repo :rocket: