NativeScript / NativeScript/nativescript-cli
iOS App Extensions - Release build error
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 1.1k
- Forks
- 204
- Ø Merge
- 1 T. 9 Std.
- Gemergte PRs (30 T.)
- 8
Beschreibung
Environment
- CLI:
├── nativescript@7.2.1 - Cross-platform modules:
@nativescript/core@7.3.0 - Android Runtime: -
- iOS Runtime:
├── @nativescript/ios@6.5.4(JSC) - XCode Version:
Xcode 12.4 (12D4e) - Plugin(s):
├── @nativescript/angular@11.2.0
├── @nativescript/webpack@4.1.0
Describe the bug
We set up a Share extension following the instructions here, it is working as intended and the development build is working fine as well.
{N}7 documentation: iOS App Extensions
(The GitHub version of the documentation page can be found here.)
But the release build fails with the error/warning message:
error: Provisioning profile "myApp" has app ID "com.myapp.mobile", which does not match the bundle ID "com.myapp.mobile.share". (in target 'share' from project 'myappcommobile')
warning: Provisioning profile "myApp" for "myappcommobile" contains entitlements that aren't in the entitlements file: com.apple.developer.associated-appclip-app-identifiers. To use these entitlements, add them to your entitlements file. Otherwise, remove unused entitlements from your provisioning profile. (in target 'myappcommobile' from project 'myappcommobile')
The relevant release build steps are:
(1) Prepare the provisioning profile of the main app (myApp):
mac-003:mobile user$ rm "/Users/user/Library/MobileDevice/Provisioning Profiles/"*
mac-003:mobile user$ uuid=`grep UUID -A1 -a myApp.mobileprovision | grep -io "[-A-F0-9]\{36\}"`
mac-003:mobile user$ cp myApp.mobileprovision "/Users/user/Library/MobileDevice/Provisioning Profiles/$uuid.mobileprovision"
mac-003:mobile user$ ns prepare ios --provision $uuid
Preparing project...
[...]
Project successfully prepared (ios)
(2) Prepare the provisioning profile of the share extension (myApp_Share):
mac-003:mobile user$ uuid2=`grep UUID -A1 -a myApp_Share.mobileprovision | grep -io "[-A-F0-9]\{36\}"`
mac-003:mobile user$ cp myApp_Share.mobileprovision "/Users/user/Library/MobileDevice/Provisioning Profiles/$uuid2.mobileprovision"
mac-003:mobile user$ ns prepare ios --provision $uuid2
Preparing project...
[...]
Project successfully prepared (ios)
(3) Run the release build
mac-003:mobile user$ ns build ios --clean --for-device --env.report --env.hiddenSourceMap --certificate keychain.p12 --certificatePassword myPassword --release --provision $uuid
Preparing project...
[...]
Building project...
Xcode build...
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
error: Provisioning profile "myApp" has app ID "com.myapp.mobile", which does not match the bundle ID "com.myapp.mobile.share". (in target 'share' from project 'myappcommobile')
[... removed unrelated warnings for readability ...]
** ARCHIVE FAILED **
Command xcodebuild failed with exit code 65
To Reproduce
- Set up a Share extension as explained here.
- Run a release build
Expected behavior
The release build succeeds the same the development build does.
Additional context
It seems the CLI does not recognize all profiles as eligible:
mac-003:mobile user$ ns prepare ios --provision
Searching for devices...
┌──────────────────────────────────────────┬────────────┬──────────────┬─────────┐
│ Provision Name / Provision UUID / App Id │ Team │ Type / Due │ Devices │
│ │ │ │ │
│ 'myApp' │ myTeam │ Distribution │ │
│ <uuid> │ (<teamid>) │ 5 Mar 2022 │ │
│ <teamid>.com.myapp.mobile │ │ │ │
└──────────────────────────────────────────┴────────────┴──────────────┴─────────┘
There are also 1 non-eligable provisioning profiles.
Please let me know if there is anything else you need to assist us on this. Thanks!
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der Dokumentation zu iOS App Extensions und reproduziere den Fehler mit ns prepare ios --provision, gefolgt von ns build ios --clean --for-device --release --provision. Verfolge, wie die CLI Provisioning-Profile für die Haupt-App und die share-Extension auswählt; abgeschlossen ist die Aufgabe, wenn der dokumentierte Release-Build der Share-Extension mit den passenden Profilen erfolgreich ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- ios, javascript, webpack
- Bereich
- build-system, cli, mobile
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 30/100