Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Support custom application identifier #155

Merged
merged 1 commit into from
Jul 7, 2020
Merged

Conversation

tido64
Copy link
Member

@tido64 tido64 commented Jul 6, 2020

Resolves #140

Test Plan

  1. Apply the patch below
  2. Build Android/iOS/macOS apps
  3. Verify that the application/bundle id is set to com.contoso.MyTestApp
diff --git a/example/android/gradle.properties b/example/android/gradle.properties
index 08bd26e..02b8080 100644
--- a/example/android/gradle.properties
+++ b/example/android/gradle.properties
@@ -1,3 +1,5 @@
 # These properties are required to enable AndroidX for the test app.
 android.useAndroidX=true
 android.enableJetifier=true
+
+TEST_APP_IDENTIFIER=com.contoso.MyTestApp
diff --git a/example/ios/Podfile b/example/ios/Podfile
index 59f8153..72aec64 100644
--- a/example/ios/Podfile
+++ b/example/ios/Podfile
@@ -1,6 +1,7 @@
 require_relative '../node_modules/react-native-test-app/test_app.rb'

 workspace 'Example.xcworkspace'
+test_app_bundle_identifier 'com.contoso.MyTestApp'

 use_test_app! do |target|
   target.tests do
diff --git a/example/macos/Podfile b/example/macos/Podfile
index 91a46da..abec4b8 100644
--- a/example/macos/Podfile
+++ b/example/macos/Podfile
@@ -1,6 +1,7 @@
 require_relative '../node_modules/react-native-test-app/macos/test_app.rb'

 workspace 'Example.xcworkspace'
+test_app_bundle_identifier 'com.contoso.MyTestApp'

 use_test_app! do |target|
   target.tests do

Android

% adb shell 'pm list packages -f' | grep contoso
package:/data/app/com.contoso.MyTestApp-lGagASJYZMeA8zqIMXmKvA==/base.apk=com.contoso.MyTestApp

iOS/macOS

image

@tido64 tido64 marked this pull request as ready for review July 7, 2020 08:59
@tido64 tido64 requested a review from sweggersen as a code owner July 7, 2020 08:59
@tido64 tido64 requested a review from alloy July 7, 2020 08:59
Copy link
Member

@alloy alloy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Short and sweet 👍

@tido64
Copy link
Member Author

tido64 commented Jul 7, 2020

Going to merge this since the macOS build machines are really struggling today:

image

Thanks for the review, everyone ❤️

@tido64 tido64 merged commit bec14b2 into master Jul 7, 2020
@tido64 tido64 deleted the tido/custom-bundle-id branch July 7, 2020 09:26
@tido64
Copy link
Member Author

tido64 commented Jul 7, 2020

🎉 This PR is included in version 0.1.25 🎉

The release is available on:

Your semantic-release bot 📦🚀

@tido64 tido64 added the released label Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to change app bundle ID
4 participants