Giter Club home page Giter Club logo

react-native-user-identity's People

Contributors

dependabot[bot] avatar juliandramirez avatar wouterflorijn avatar wwdrew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-native-user-identity's Issues

Emphasis "Sign In" instead of "Cancel" for iOS when iosUserConfirmation is true

Hello,

First of all thank your for having created and for maintaining this package.

For iOS, when setting iosUserConfirmation to true, the following dialog opens:

[https://raw.githubusercontent.com/juliandramirez/react-native-user-identity/master/docs/img/ios-user-confirmation.png]

Is it possible to write in bold the "Sign In" text instead of the "Cancel" one?

If not, is it possible to unbold the "Cancel" text?

Thanks in advance

Get active emailId

How can i get active email Id in android like, Is there any way to get current selected google play store email ID ?

Thank you in Advance ☺️

Apple will not accept UIWebView anymore.

When submitting Apps to Testflight, Apple replies with an email that includes:

ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs. See https://developer.apple.com/documentation/uikit/uiwebview for more information.

Now, I was able to track down the UIWebViews to this repo (find it too in my Firebase and FBSDK dependencies but just bumping to the latest version fixed it) but strangely enough I can find it anywhere on the code, only in the myApp/ios/build/ directory. Any help with this issue would be much appreciated as Apple can start rejecting Apps for this reason at any point now (at this point looks like is only a warning).

Thanks in advance.

Xcode Compilation error

Once the package is installed, i receive error on react-native run-ios command:

Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening APP_NAME.xcworkspace.
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace APP_NAME.xcworkspace -configuration Debug -scheme APP_NAME -destination id=E6431465-C8E5-44C7-B314-7892A1D7DE6B

note: Building targets in dependency order
error: Multiple commands produce '/Users/denissdubinin/Library/Developer/Xcode/DerivedData/APP_NAME-dnjatakakjaxpiekqdjtnwmzpjts/Build/Products/Debug-iphonesimulator/react-native-user-identity/react_native_user_identity.framework/Headers/RNUserIdentity-Swift.h'
    note: Target 'react-native-user-identity' (project 'Pods') has copy command from '/Users/denissdubinin/dev/moneyonative/node_modules/react-native-user-identity/ios/DerivedData/RNUserIdentity/Index/Build/Intermediates.noindex/RNUserIdentity.build/Debug-maccatalyst/RNUserIdentity.build/DerivedSources/RNUserIdentity-Swift.h' to '/Users/denissdubinin/Library/Developer/Xcode/DerivedData/APP_NAME-dnjatakakjaxpiekqdjtnwmzpjts/Build/Products/Debug-iphonesimulator/react-native-user-identity/react_native_user_identity.framework/Headers/RNUserIdentity-Swift.h'
    note: Target 'react-native-user-identity' (project 'Pods') has copy command from '/Users/denissdubinin/dev/moneyonative/node_modules/react-native-user-identity/ios/DerivedData/RNUserIdentity/Index/Build/Intermediates.noindex/RNUserIdentity.build/Debug-maccatalyst/RNUserIdentity.build/Objects-normal/x86_64/RNUserIdentity-Swift.h' to '/Users/denissdubinin/Library/Developer/Xcode/DerivedData/APP_NAME-dnjatakakjaxpiekqdjtnwmzpjts/Build/Products/Debug-iphonesimulator/react-native-user-identity/react_native_user_identity.framework/Headers/RNUserIdentity-Swift.h'
warning: duplicate output file '/Users/denissdubinin/Library/Developer/Xcode/DerivedData/APP_NAME-dnjatakakjaxpiekqdjtnwmzpjts/Build/Products/Debug-iphonesimulator/react-native-user-identity/react_native_user_identity.framework/Headers/RNUserIdentity-Swift.h' on task: CpHeader /Users/denissdubinin/Library/Developer/Xcode/DerivedData/APP_NAME-dnjatakakjaxpiekqdjtnwmzpjts/Build/Products/Debug-iphonesimulator/react-native-user-identity/react_native_user_identity.framework/Headers/RNUserIdentity-Swift.h /Users/denissdubinin/dev/moneyonative/node_modules/react-native-user-identity/ios/DerivedData/RNUserIdentity/Index/Build/Intermediates.noindex/RNUserIdentity.build/Debug-maccatalyst/RNUserIdentity.build/Objects-normal/x86_64/RNUserIdentity-Swift.h (in target 'react-native-user-identity' from project 'Pods')

** BUILD FAILED **

I have completed all steps in installation guide.

        "react": "18.1.0",
        "react-native": "0.70.6",
        "yarn": "^1.22.19"

Expo Config Plugin?

Would you be interested in a PR for an expo config plugin for this?

Is this something you've tried already?

Incompatibility with react-native-firebase

Hello,
I'm using this package with react-native-firebase.

In their documentation, it's specified to set:
use_frameworks! :linkage => :static

With this setup, I get the following error even in a fresh project:

❯ yarn ios --simulator="iPhone 14"
yarn run v1.22.19
$ react-native run-ios '--simulator=iPhone 14'
[...]

note: Building targets in dependency order
error: Multiple commands produce '/Users/rob/SideProjects/mot/front/ios/DerivedData/mot/Build/Products/Debug-iphonesimulator/react-native-user-identity/react_native_user_identity.framework/Headers/RNUserIdentity-Swift.h'
    note: Target 'react-native-user-identity' (project 'Pods') has copy command from '/Users/rob/SideProjects/mot/front/node_modules/react-native-user-identity/ios/DerivedData/RNUserIdentity/Index/Build/Intermediates.noindex/RNUserIdentity.build/Debug-maccatalyst/RNUserIdentity.build/DerivedSources/RNUserIdentity-Swift.h' to '/Users/rob/SideProjects/mot/front/ios/DerivedData/mot/Build/Products/Debug-iphonesimulator/react-native-user-identity/react_native_user_identity.framework/Headers/RNUserIdentity-Swift.h'
    note: Target 'react-native-user-identity' (project 'Pods') has copy command from '/Users/rob/SideProjects/mot/front/node_modules/react-native-user-identity/ios/DerivedData/RNUserIdentity/Index/Build/Intermediates.noindex/RNUserIdentity.build/Debug-maccatalyst/RNUserIdentity.build/Objects-normal/x86_64/RNUserIdentity-Swift.h' to '/Users/rob/SideProjects/mot/front/ios/DerivedData/mot/Build/Products/Debug-iphonesimulator/react-native-user-identity/react_native_user_identity.framework/Headers/RNUserIdentity-Swift.h'
ClangStatCache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-stat-cache /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.4.sdk /Users/rob/SideProjects/mot/front/ios/DerivedData/SDKStatCaches.noindex/iphonesimulator16.4-20E238-.sdkstatcache
    cd /Users/rob/SideProjects/mot/front/ios
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-stat-cache /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.4.sdk -o /Users/rob/SideProjects/mot/front/ios/DerivedData/SDKStatCaches.noindex/iphonesimulator16.4-20E238-.sdkstatcache

[...]

2023-07-24 18:41:10.665 xcodebuild[88159:723109] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)
** BUILD FAILED **

]

Node.js v20.5.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I don't know how to fix that.
Any pist? @juliandramirez

App crash RNUserIdentityModule.java line 42 & line 44

I am working in react native app, where I have implement this package. After implementing I did not get any error in development mode, but after app publish, Firebase Crashlytics showing me crashes on regular crashes.

Project currently running on:
React Native: 0.63
React:16.13.1

Crashlytics log

Fatal Exception: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { (has extras) }} to activity {com.rdiscovery/com.rdiscovery.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.bridge.Promise.resolve(java.lang.Object)' on a null object reference
       at android.app.ActivityThread.deliverResults(ActivityThread.java:5200)
       at android.app.ActivityThread.handleSendResult(ActivityThread.java:5241)
       at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:140)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:100)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2230)
       at android.os.Handler.dispatchMessage(Handler.java:107)
       at android.os.Looper.loop(Looper.java:237)
       at android.app.ActivityThread.main(ActivityThread.java:7824)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:512)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1027)

Caused By:

Caused by java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.bridge.Promise.resolve(java.lang.Object)' on a null object reference
       at com.github.juliandramirez.rn.useridentity.RNUserIdentityModule$1.onActivityResult(RNUserIdentityModule.java:42)
       at com.facebook.react.bridge.ReactContext.onActivityResult(ReactContext.java:308)
       at com.facebook.react.ReactInstanceManager.onActivityResult(ReactInstanceManager.java:758)
       at com.facebook.react.ReactDelegate.onActivityResult(ReactDelegate.java:90)
       at com.facebook.react.ReactActivityDelegate.onActivityResult(ReactActivityDelegate.java:112)
       at com.facebook.react.ReactActivity.onActivityResult(ReactActivity.java:68)
       at android.app.Activity.dispatchActivityResult(Activity.java:8320)
       at android.app.ActivityThread.deliverResults(ActivityThread.java:5193)
       at android.app.ActivityThread.handleSendResult(ActivityThread.java:5241)
       at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:140)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:100)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2230)
       at android.os.Handler.dispatchMessage(Handler.java:107)
       at android.os.Looper.loop(Looper.java:237)
       at android.app.ActivityThread.main(ActivityThread.java:7824)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:512)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1027)

See screenshot for your reference:
1
2

See Crash Statistics:
It shows total 19 devices are facing this crash after implementation.
Please note column named with "Device Current" is showing Android version.
image (2)

Build Failed with react native 0.70.0

Execution failed for task ':react-native-user-identity:verifyReleaseResources'.

A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
Android resource linking failed
ERROR:D:\Sajid\projects\temp\tempApp\node_modules\react-native-user-identity\android\build\intermediates\merged_res\release\values\values.xml:2722: AAPT: error: resource android:attr/lStar not found.

Expo app crashes when fetchUserIdentity is called

Hello! Thanks for making this package. I am trying to get it to work in my Expo app that I'm building for iOS. I'm calling getUserId like this:

const fetchUserIdentity = async () => {
    try {
        const result = await RNUserIdentity.getUserId({});
        return result;
    } catch (error) {
        return null;
    }
};

where I pass an empty object to getUserId because it requires an options argument now it seems.

I am also having Expo request iCloud Storage permissions with:

"ios": {
    "supportsTablet": true,
    "bundleIdentifier": "com.myname.myapp",
    "entitlements": {
        "com.apple.developer.icloud-container-identifiers": [
            "iCloud.com.myname.myapp"
        ]
    }
}

in Expo's app.json file - not sure if this is correct either.

When the fetchUserIdentity function above gets executed, my app crashes. Let me know if you have any ideas, thanks.

Android gradle build fails

When running > ./gradlew bundleRelease, I have this error:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':react-native-user-identity:bundleLibRuntimeToJarRelease'.
> Could not create task ':react-native-user-identity:compileReleaseJavaWithJavac'.
   > In order to compile Java 9+ source, please set compileSdkVersion to 30 or above

It happens since react-native 0.72.0 and is due to:

.android/build.gradle:

android {
    compileSdkVersion 28
    ...
}

Possible fix: replace this by

def safeExtGet(prop, fallback) {
    rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
...
compileSdkVersion safeExtGet('compileSdkVersion', 28)

What are steps for installation using EXPO? Getting an error currently.

I first added the package using the command:
yarn add react-native-user-identity

Here is the error I receive when calling GetUserId()
TypeError: Cannot read property 'getUserIdentity' of null, js engine: hermes

The next step is I generated a new iOS build and the build errored with the following:
image

Appreciate all the help!

TypeError: Cannot read properties of undefined (reading 'getUserId')

I can't access the getUserId function.

import RNUserIdentity, { ICLOUD_ACCESS_ERROR } from 'react-native-user-identity'
const checkAccount = async () => {
	try {
		const result = await RNUserIdentity.getUserId()
		// const result = await RNUserIdentity.default.getUserId()
		// const result = await RNUserIdentity.getUserIdentity()
		if (result === null) {
			onPressed?.(false)
			if (alert) {
				Alert.alert(
					"iCloud Error",
					"You have to enable iCloud to add your ID to your Apple Wallet"
				)
			}
		}
		else {
			onPressed?.(true)
		}
	} catch (error) {
		console.error(error)
		if (error === ICLOUD_ACCESS_ERROR) {
			if (alert) {
				Alert.alert(
					"iCloudError",
					"Unable to access iCloud"
				)
			}
			return onPressed?.(false, error)
		}

		throw error
	}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.