Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IJ
#
Expand Down
36 changes: 18 additions & 18 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ import com.android.build.OutputFile
*/

project.ext.react = [
entryFile: "index.js",
enableHermes: false, // clean and rebuild if changing
// quasi-unstable: see commits 8f8a266af and 833d083a9
jsBundleDirRelease: "$buildDir/intermediates/merged_assets/release/out"
entryFile : "index.js",
enableHermes : false, // clean and rebuild if changing
// quasi-unstable: see commits 8f8a266af and 833d083a9
jsBundleDirRelease: "$buildDir/intermediates/merged_assets/release/out"
]

apply from: "../../node_modules/react-native/react.gradle"
Expand Down Expand Up @@ -122,15 +122,15 @@ def enableProguardInReleaseBuilds = false
def shrinkResourcesInProguardBuilds = false

/**
* The preferred build flavor of JavaScriptCore.
*
* For example, to use the international variant, you can use:
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
* The preferred build flavor of JavaScriptCore.
*
* For example, to use the international variant, you can use:
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'

Expand Down Expand Up @@ -191,7 +191,7 @@ android {
release {
minifyEnabled enableProguardInReleaseBuilds
// `minifyEnabled` is required for `shrinkResources`
shrinkResources (enableProguardInReleaseBuilds && shrinkResourcesInProguardBuilds)
shrinkResources(enableProguardInReleaseBuilds && shrinkResourcesInProguardBuilds)

proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
if (project.hasProperty('signed')) {
Expand Down Expand Up @@ -238,11 +238,11 @@ dependencies {
implementation "com.facebook.react:react-native:+" // From node_modules

if (enableHermes) {
def hermesPath = "../../node_modules/hermesvm/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
def hermesPath = "../../node_modules/hermesvm/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
implementation jscFlavor
}

implementation 'com.facebook.fresco:animated-gif:1.10.0' // For animated GIF support
Expand Down
10 changes: 0 additions & 10 deletions android/app/src/main/java/com/zulipmobile/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.zulipmobile;

import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.webkit.WebView;
import com.facebook.react.ReactActivity;
Expand All @@ -22,12 +20,4 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
WebView.setWebContentsDebuggingEnabled(true);
}

@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
Intent intent = new Intent("onConfigurationChanged");
intent.putExtra("newConfig", newConfig);
this.sendBroadcast(intent);
}
Comment on lines -25 to -32
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Interesting, good catch!

Let's remove this from ReceiveShareActivity.kt too. I puzzled a bit over that when reviewing #4124 which added it... and then saw it was copied from MainActivity and I guess I figured it was generic RN boilerplate, and didn't study it closer. (But in retrospect this story makes more sense -- if it were generic RN boilerplate they could just put it in the base class.)

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.zulipmobile.sharing

import android.content.Context
import android.content.Intent
import android.content.res.Configuration
import android.net.Uri
import android.os.Bundle
import android.util.Log
Expand Down Expand Up @@ -105,13 +104,6 @@ class ReceiveShareActivity : ReactActivity() {
}
return params
}

override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
val intent = Intent("onConfigurationChanged")
intent.putExtra("newConfig", newConfig)
this.sendBroadcast(intent)
}
}

class ShareParamsParseException(errorMessage: String) : RuntimeException(errorMessage)
6 changes: 3 additions & 3 deletions docs/howto/ios-tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ device name in package.json
2. Within the repo, `$ open ios/ZulipMobile.xcworkspace/` to open
Xcode. Make sure you choose the one that ends in .xcworkspace,
not .xcodeproj.
3. Change BundleIdentifier for both ZulipMobile and ZulipMobileTests to a
unique string, e.g. `<username>ZulipMobile` in the 'General Tab' of your project.
3. Change BundleIdentifier for ZulipMobile to a unique string, e.g.
`<username>ZulipMobile` in the 'General Tab' of your project.
4. Select your device as the `build target` (from [this guide](https://reactnative.dev/docs/running-on-device))
5. Hit the `build and run` button (make sure your device is unlocked)
6. If it's the first time you're running the app, you need to trust the
Expand All @@ -39,7 +39,7 @@ mobile networks
If it's your first time installing an app on an iOS device, you need to
obtain Apple Developer credentials that will allow you to sign the app.
Register at https://developer.apple.com. Then use your Apple ID in Xcode
and choose it as your `Signing > Team` for both ZulipMobile and ZulipMobileTests.
and choose it as your `Signing > Team` for ZulipMobile.

### Tips when running on your iOS device
When you change the BundleIdentifier and Team (required in order to run on a device),
Expand Down
6 changes: 0 additions & 6 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,4 @@ target 'ZulipMobile' do

# unimodules provides Expo packages individually.
use_unimodules!

target 'ZulipMobileTests' do
inherit! :search_paths
# Pods for testing
end

end
8 changes: 7 additions & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ PODS:
- React-cxxreact (= 0.60.6)
- React-jsi (= 0.60.6)
- React-jsinspector (0.60.6)
- react-native-cameraroll (1.7.2):
- React
- react-native-image-picker (0.14.3):
- React
- react-native-netinfo (3.2.1):
Expand Down Expand Up @@ -167,6 +169,7 @@ DEPENDENCIES:
- React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
- "react-native-cameraroll (from `../node_modules/@react-native-community/cameraroll`)"
- react-native-image-picker (from `../node_modules/react-native-image-picker`)
- "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
- react-native-notifications (from `../node_modules/react-native-notifications`)
Expand Down Expand Up @@ -251,6 +254,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/jsiexecutor"
React-jsinspector:
:path: "../node_modules/react-native/ReactCommon/jsinspector"
react-native-cameraroll:
:path: "../node_modules/@react-native-community/cameraroll"
react-native-image-picker:
:path: "../node_modules/react-native-image-picker"
react-native-netinfo:
Expand Down Expand Up @@ -358,6 +363,7 @@ SPEC CHECKSUMS:
React-jsi: 1a4248256b96fa453536a8dafe11b784e24e789d
React-jsiexecutor: 2279e559b921d02dfc6253ebef3dcb3a9dc6c07e
React-jsinspector: a58b86545a0185f69768e78ac96ca9fe43fa3694
react-native-cameraroll: 06e60780a4e6e7bb9a588eca72506744cf6e133b
react-native-image-picker: 3693786b3d5958c8f71deed66ec068b323565e0d
react-native-netinfo: 0da34082d2cec3100c9b5073bb217e35f1142bdd
react-native-notifications: ce37363008fe2d6a226da4e721eace23b6ae3ad9
Expand Down Expand Up @@ -399,6 +405,6 @@ SPEC CHECKSUMS:
UMTaskManagerInterface: 1e70fe58b872355f0ecb44fb81bb1a16484047f0
yoga: 5079887aa3e4c62142d6bcee493022643ee4d730

PODFILE CHECKSUM: 35e31db914557542fa277c2ec99e983927f39658
PODFILE CHECKSUM: 21c8ba3e839e2d99477fac31255085d875c73084

COCOAPODS: 1.9.1
Loading